Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class TestAutoload
- {
- protected $foo;
- public function __construct($foo)
- {
- $this->foo = $foo;
- }
- public function load()
- {
- var_dump($this->foo);
- return false;
- }
- }
- $test1 = new TestAutoload('foo');
- $test2 = new TestAutoload('bar');
- spl_autoload_register(array($test1, 'load'));
- spl_autoload_register(array($test2, 'load'));
- new NonExistingCode();
Add Comment
Please, Sign In to add comment