Hi guys,I was trying to figure out the advantages of OOP in php,but still not getting a good reason to make it use in real work.
Wat I'm trying to say is,
class introduceYourself
{
private $_name;
public function __construct($name)
{
$this->_name = $name;
}
public function writeName()
{
echo 'My name is ', $this->_name, .'<br />';
}
}
$intro = new introduceYourself("someone");
$intro->writeName();
///////////////////////////////////
output://////////////////////////
My name is someone///////////
/////////////////////////////////
Can someone demonstrate a superb example where,use of classes will really make sense:?
I need some facebook likes, can you please help me 🤝 http://facebook.com/softwarefreakin I noticed social media is really powerful 🧙 Well DONE is better than well SAID