Bug #81505 [Opn->Csd]: preg_match BC after apt-get upgrade

From: Date: Tue, 05 Oct 2021 11:45:33 +0000
Subject: Bug #81505 [Opn->Csd]: preg_match BC after apt-get upgrade
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237041@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81505&edit=1 ID: 81505 User updated by: php at tim dot ainfach dot de Reported by: php at tim dot ainfach dot de Summary: preg_match BC after apt-get upgrade -Status: Open +Status: Closed Type: Bug Package: *Regular Expressions Operating System: OSX 10.14.6 PHP Version: 8.0.11 Block user comment: N Private report: N New Comment: resolved: https://github.com/oerdnj/deb.sury.org/issues/1653 Previous Comments: ------------------------------------------------------------------------ [2021-10-05 10:30:15] php at tim dot ainfach dot de i crossposted this bug here: https://github.com/oerdnj/deb.sury.org/issues/1653 i guess it's related to one of these packages: libargon2-1 libidn2-0 libpcre2-8-0 libpcre3 libxml2 libzstd1 ------------------------------------------------------------------------ [2021-10-05 10:18:44] php at tim dot ainfach dot dq here is the complete output when running the command: https://gist.github.com/timglabisch/75683af0250262a556cd0d694414a742 ------------------------------------------------------------------------ [2021-10-05 10:16:09] php at tim dot ainfach dot de 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 this bug report at https://bugs.php.net/bug.php?id=81505&edit=1

« previous php.bugs (#237041) next »