Source Code:
(back to article)
<?php class w3Docs { public function __toString() { // returns the class name return __CLASS__; } } // printing the name of the class above as // a string echo strval(new w3Docs()); ?>
Result:
Report an issue