Doc #62080 [NEW]: Vague/misleading example in call_user_func()

From: Date: Sun, 20 May 2012 18:58:27 +0000
Subject: Doc #62080 [NEW]: Vague/misleading example in call_user_func()
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8376@lists.php.net to get a copy of this message
From: Operating system: All PHP version: 5.3.13 Package: Documentation problem Bug Type: Documentation Problem Bug description:Vague/misleading example in call_user_func() Description: ------------ The doc page for call_user_func explains you can't pass arguments by reference (CORRECT) using it, and instead offers this line using call_user_func_array(): "call_user_func_array('increment', array(&$a)); // You can use this instead before PHP 5.3" This comment "You can use this instead before PHP 5.3" is misleading and redundant. Nothing has changed in 5.3 regarding references in the arguments array. This is not call-time pass by reference, it's references in an array. This code work well in 5.2 & in 5.3, without errors/warnings. This comment should be removed, the example is otherwise correct. -- Edit bug report at https://bugs.php.net/bug.php?id=62080&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62080&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62080&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62080&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62080&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62080&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62080&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62080&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62080&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62080&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62080&r=support Expected behavior: https://bugs.php.net/fix.php?id=62080&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62080&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62080&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62080&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62080&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62080&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62080&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62080&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62080&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62080&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62080&r=mysqlcfg

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