<?
Class CallMe { public function setup() { $this->fakeMethod(); }
protected function __call($method, $params) { echo 'you called CallMe::'.$method."\n"; } }
echo <<< ___THEEND EXPECTED RESULT: ----------------------------------------- you called CallMe::fakeMethod
ACTUAL RESULT: -----------------------------------------
___THEEND;
$obj = new CallMe(); $obj->setup();
?>
running the script on 'PHP 5.0.0RC2-dev (cli) (built: Apr 4 2004 13:07:13) (DEBUG)' gives me:
<snip> EXPECTED RESULT: ----------------------------------------- you called CallMe::fakeMethod
ACTUAL RESULT:
-----------------------------------------
PHP Fatal error: Call to protected method CallMe::__call() from context '' in /var/www/santos/test/call.protected.php on line 7
Fatal error: Call to protected method CallMe::__call() from context '' in /var/www/santos/test/call.protected.php on line 7
</snip>
Have I misunderstood the way PHP5 works?
Or maybe something is broken? does anyone else get an error?
I don't rule out that this could be something specific to the machine I am on, unfortunately I am limited by knowledge and access in determining if this is the case.
Kind Regards,
Jochem.
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php