@QuickOldCar I am not sure I got what your'e trying to say.
anyway here's a screenshot of how it did look when posting this problem here:
http://4.1m.yt/8qLiQI9.png
and after I changed the code to look like this - calling the unset method explicitly it now shows it properly:
(I post the second class only for convenience):
class MyOtherClass extends MyClass
{
public function __construct()
{
echo "A new constructor in " . __CLASS__ . ".<br />";
}
public function newMethod()
{
echo "From a new method in " . __CLASS__ . ".<br />";
}
}
// Create a new object
$newobj = new MyOtherClass;
// Output the object as a string
echo $newobj->newMethod();
// Use a method from the parent class
echo $newobj->getProperty();
unset($newobj); generate messsage on browser.
?>
And now it shows well:
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.