Bug #81505 [NEW]: preg_match BC after apt-get upgrade

From: Date: Tue, 05 Oct 2021 10:16:09 +0000
Subject: Bug #81505 [NEW]: preg_match BC after apt-get upgrade
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237038@lists.php.net to get a copy of this message
From: php at tim dot ainfach dot de Operating system: OSX 10.14.6 PHP version: 8.0.11 Package: *Regular Expressions Bug Type: Bug Bug description:preg_match BC after apt-get upgrade Description: ------------ We have noticed that a test failed in our CI process. I guess its a BC in preg_match. I am not 100% sure if it's related to php / ubuntu or ppa:ondrej/php but i guess a lot of people are affected by this. We could also reproduce this issue on different servers and containers. you can reproduce the issue in with docker. The only difference here is the apt-get upgrade. foo.php is the example script. docker run --rm -v "pwd/foo.php:/foo.php" -it ubuntu:latest \ /bin/bash -c 'apt-get update && apt-get install software-properties-common -y && add-apt-repository ppa:ondrej/php && apt-get update && apt-get install -y php8.0-cli && php -v && php /foo.php' # array(3) { # [0]=> # string(19) "/348182/XXX_348102/" # [1]=> # string(6) "348182" # [2]=> # string(6) "348102" # } echo "now with upgrade" # array(0) { # } docker run --rm -v "pwd/foo.php:/foo.php" -it ubuntu:latest \ /bin/bash -c 'apt-get update && apt-get install software-properties-common -y && add-apt-repository ppa:ondrej/php && apt-get update && apt-get upgrade && apt-get install -y php8.0-cli && php -v && php /foo.php' Test script: --------------- <?php preg_match('/\/([\d]+)\/XXX_([\d]+)\//', '00/348/348182/XXX_348102/xxx', $matches); var_dump($matches); Expected result: ---------------- array(3) { [0]=> string(19) "/348182/XXX_348102/" [1]=> string(6) "348182" [2]=> string(6) "348102" } Actual result: -------------- array(0) { } -- Edit bug report at https://bugs.php.net/bug.php?id=81505&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81505&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81505&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81505&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81505&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81505&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81505&r=support Expected behavior: https://bugs.php.net/fix.php?id=81505&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81505&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81505&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81505&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81505&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81505&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81505&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81505&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81505&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81505&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81505&r=mysqlcfg

« previous php.bugs (#237038) next »