|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-10-07 14:10 UTC] nikic@php.net
[2021-10-07 14:10 UTC] nikic@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: dmitry
[2021-10-07 18:29 UTC] git@php.net
[2021-10-07 18:29 UTC] git@php.net
-Status: Assigned
+Status: Closed
[2021-10-25 16:41 UTC] s dot pankratoff at gmail dot com
[2021-10-25 17:15 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 09:00:02 2025 UTC |
Description: ------------ We migrated from php 7.4 to 8 and encountered an issue. In mongodb/mongo-php-library there is the function 'is_pipeline' that checks that the given argument is the correct pipeline. This function started to return false for correct pipelines. I reduced the function. See the test script section. To reproduce the behavior run the test script with opcache.enable_cli=1 and opcache.jit=tracing. Optimization flags 0052 also trigger the issue. We think it may be due to the "Inline VM handlers" option. Test script: --------------- $pipe = [['val1'],['val2'],]; for ($i = 0; $i < 30; ++$i) { echo "$i "; if (!is_pipeline($pipe)) { echo 'ERROR '; } } function is_pipeline($pipeline): bool { foreach ($pipeline as $stage) { if (!is_array($stage)) { return false; // must never happen } $stage = (array) $stage; reset($stage); } return true; } Expected result: ---------------- 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Actual result: -------------- 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ERROR 22 ERROR 23 ERROR 24 ERROR 25 ERROR 26 ERROR 27 ERROR 28 ERROR 29 ERROR