Bug #70289 [NEW]: Different sort in php7 (and hhvm) compared to php5
| From: | kjarli at gmail dot com | Date: | Tue, 18 Aug 2015 08:08:17 +0000 |
| Subject: | Bug #70289 [NEW]: Different sort in php7 (and hhvm) compared to php5 | ||
| Groups: | php.bugs php.qa | ||
| Request: | Send a blank email to php-bugs+get-195264@lists.php.net to get a copy of this message | ||
From: kjarli at gmail dot com
Operating system: Ubuntu 14.04
PHP version: 7.0.0beta3
Package: Testing related
Bug Type: Bug
Bug description:Different sort in php7 (and hhvm) compared to php5
Description:
------------
I haven't gotten a proper test setup, but I do have the travis builds. I
was working on a priority sorting feature and I had added a test to
verify sort orders. On php5 it consistently went right, but on php7 and
hhvm it was in reversed order. I fixed it by adding a secondary sort
(strcmp).
Build #45 (failed):
https://travis-ci.org/iltar/http-bundle/builds/76059069
Build #46 (failed):
https://travis-ci.org/iltar/http-bundle/builds/76061283
Build #47 (fixed):
https://travis-ci.org/iltar/http-bundle/builds/76062321
The test in question:
https://github.com/iltar/http-bundle/blob/feature/property-accessor/test/DependencyInjection/DecorateRouterPassTest.php#L72-L112
It's about the one with a priority of 50, which is reversed as you can
see in the failed output.
Test script:
---------------
https://github.com/iltar/http-bundle/blob/feature/property-accessor/test/DependencyInjection/DecorateRouterPassTest.php#L72-L112
Expected result:
----------------
I expect to see consistent sorting, but that was not the case.
sequence:
app.henk2_50
app.henk_50
Actual result:
--------------
sequence:
app.henk_50
app.henk2_50
--
Edit bug report at https://bugs.php.net/bug.php?id=70289&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70289&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70289&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70289&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70289&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70289&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70289&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70289&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70289&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70289&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70289&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70289&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70289&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70289&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70289&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70289&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70289&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70289&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70289&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70289&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70289&r=mysqlcfg