note 102461 deleted from language.oop5 by danbrown
[email protected] Wed, 16 Feb 2011 05:54:34 -0800
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: mojo
----
This does not work yet as of PHP 5.3 (just if you try):
<?php
$test = (object) array(
'loadClass' => function($name) {
require(dirname(__FILE__).'classes/'.$name.'.php');
}
);
$test->loadClass('test');
?>
Fatal error: Call to undefined method stdClass::loadClass() in Example.php on line 7