Doc #75546 [NEW]: iterator-apply parameter passed unexpected

From: Date: Tue, 21 Nov 2017 06:21:40 +0000
Subject: Doc #75546 [NEW]: iterator-apply parameter passed unexpected
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15248@lists.php.net to get a copy of this message
From: ycgambo at outlook dot com Operating system: centos6 PHP version: 5.6.32 Package: SPL related Bug Type: Documentation Problem Bug description:iterator-apply parameter passed unexpected Description: ------------ --- From manual page: http://www.php.net/function.iterator-apply --- the 3rd parameter args of iterator-apply doesn't passed to callback as an array. Test script: --------------- <?php $ai = new ArrayIterator(range(0, 2)); iterator_apply($ai, function($args) { var_dump($args); return true; }, array(1, 2)); Expected result: ---------------- array(2) { [0] => int(1) [1] => int(2) } array(2) { [0] => int(1) [1] => int(2) } array(2) { [0] => int(1) [1] => int(2) } Actual result: -------------- int(1) int(1) int(1) -- Edit bug report at https://bugs.php.net/bug.php?id=75546&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75546&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75546&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75546&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75546&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75546&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75546&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75546&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75546&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75546&r=support Expected behavior: https://bugs.php.net/fix.php?id=75546&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75546&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75546&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75546&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75546&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75546&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75546&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75546&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75546&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75546&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75546&r=mysqlcfg

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