Bug #52158 [NEW]: invokeArgs with args should be pass ref cause ReflectionException

From: Date: Wed, 23 Jun 2010 11:56:59 +0000
Subject: Bug #52158 [NEW]: invokeArgs with args should be pass ref cause ReflectionException
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4590@lists.php.net to get a copy of this message
From: Operating system: PHP version: 5.2.14RC1 Package: Documentation problem Bug Type: Bug Bug description:invokeArgs with args should be pass ref cause ReflectionException Description: ------------ ReflectionMethod or ReflectionFunction reflects a funtion with arguments shoule be passed by reference, when invokeArgs cause invocation failed with a Exception. I think this should been noted in php manual more info(chinese) :http://www.laruence.com/2010/06/22/1618.html Test script: --------------- function who(&$name) { echo $name; } $name = "laruence"; $method = new ReflectionFunction("who"); $method->invokeArgs(array($name)); Expected result: ---------------- "laruence" Actual result: -------------- Uncaught exception 'ReflectionException' with message 'Invocation of function who() failed' -- Edit bug report at http://bugs.php.net/bug.php?id=52158&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52158&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52158&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52158&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52158&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52158&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52158&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52158&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52158&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52158&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52158&r=support Expected behavior: http://bugs.php.net/fix.php?id=52158&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52158&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52158&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52158&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52158&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52158&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52158&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52158&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52158&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52158&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52158&r=mysqlcfg

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