Bug #73267 [NEW]: Order by callback changed

From: Date: Fri, 07 Oct 2016 21:21:12 +0000
Subject: Bug #73267 [NEW]: Order by callback changed
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13997@lists.php.net to get a copy of this message
From: me at evertpot dot com Operating system: PHP version: 7.1.0RC3 Package: Documentation problem Bug Type: Bug Bug description:Order by callback changed Description: ------------ Hey guys, I noticed one of my unittests failing on PHP 7.1. Took me a bit to figure out what was going on, but ended up figuring out that if you sort-by-callback, PHP 7.1 has a different order. The use-case might sound a bit weird, and I'm certainly not suggesting that this is a bug. I merely wanted to suggest that maybe this might be added to the "Backwards compatibility changed" document. Test script: --------------- https://3v4l.org/DWujs <?php $foo = [1,1]; $bar = [ function() use (&$k) { echo "first!"; }, function() use (&$k) { echo "second!"; }, ]; array_multisort($foo, SORT_NUMERIC, $bar); $bar[0](); ?> -- Edit bug report at https://bugs.php.net/bug.php?id=73267&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73267&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73267&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73267&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73267&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73267&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73267&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73267&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73267&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73267&r=support Expected behavior: https://bugs.php.net/fix.php?id=73267&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73267&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73267&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73267&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73267&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73267&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73267&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73267&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73267&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73267&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73267&r=mysqlcfg

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