Bug #75806 [NEW]: version_compare does strange things with string starting with "p"

From: Date: Fri, 12 Jan 2018 00:21:08 +0000
Subject: Bug #75806 [NEW]: version_compare does strange things with string starting with "p"
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213482@lists.php.net to get a copy of this message
From: ksours at internetbrands dot com Operating system: PHP version: 7.0.27 Package: *General Issues Bug Type: Bug Bug description:version_compare does strange things with string starting with "p" Description: ------------ version_compare appears to treat any string starting with p at the pl=p level when doing comparisons, which is contrary to the documented behavior Test script: --------------- echo version_compare('1.0.0', '1.0.0ptotalgarbage'); Expected result: ---------------- 1 Actual result: -------------- -1 -- Edit bug report at https://bugs.php.net/bug.php?id=75806&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75806&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75806&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75806&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75806&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75806&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75806&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75806&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75806&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75806&r=support Expected behavior: https://bugs.php.net/fix.php?id=75806&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75806&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75806&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75806&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75806&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75806&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75806&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75806&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75806&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75806&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75806&r=mysqlcfg

« previous php.bugs (#213482) next »