Doc #65071 [NEW]: magic __call not implemented as documented

From: Date: Thu, 20 Jun 2013 15:47:41 +0000
Subject: Doc #65071 [NEW]: magic __call not implemented as documented
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9957@lists.php.net to get a copy of this message
From: simong at ganz dot com Operating system: PHP version: 5.3.26 Package: Reflection related Bug Type: Documentation Problem Bug description:magic __call not implemented as documented Description: ------------ --- From manual page: http://php.net/manual/en/language.oop5.magic.php --- Reflected invocation of protected method fails with: "PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Trying to invoke protected method" Documentation says: "__call() is triggered when invoking inaccessible methods in an object context." Should read: "__call() is triggered when invoking invisible methods in an object context." Test script: --------------- <?php class test { public function __call($name, $args) { return 123; } } class testdev extends test { protected function cansee() { return 456; } } $x = new testdev(); $r = new ReflectionMethod($x, 'cansee'); echo $r->invoke($x) . "\n"; -- Edit bug report at https://bugs.php.net/bug.php?id=65071&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65071&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65071&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65071&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65071&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65071&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65071&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65071&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65071&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65071&r=support Expected behavior: https://bugs.php.net/fix.php?id=65071&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65071&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65071&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65071&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65071&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65071&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65071&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65071&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65071&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65071&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65071&r=mysqlcfg

« previous php.doc.bugs (#9957) next »