Published in: PHP
<?php class Person { private $firstName; private $lastName; private $age; private $country; function __call($method, $arguments) { return; } return $this->$property; } if ($prefix == "set") { $this->$property = $arguments[0]; } } } $personObj = new Person; $personObj->setFirstName("Pepe"); $personObj->setLastName("Argento"); $personObj->setAge(50); $personObj->setCountry("Argentina"); ?>
You need to login to post a comment.
