|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-10-05 10:18 UTC] php at tim dot ainfach dot dq
[2021-10-05 10:30 UTC] php at tim dot ainfach dot de
[2021-10-05 11:45 UTC] php at tim dot ainfach dot de
-Status: Open
+Status: Closed
[2021-10-05 11:45 UTC] php at tim dot ainfach dot de
[2021-10-05 14:50 UTC] requinix@php.net
-Status: Closed
+Status: Not a bug
-Package: *Regular Expressions
+Package: PCRE related
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 15:00:01 2025 UTC |
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) { }