Bug #81425 [Opn->Fbk]: exit being ignored in loops

From: Date: Wed, 08 Sep 2021 13:41:45 +0000
Subject: Bug #81425 [Opn->Fbk]: exit being ignored in loops
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236465@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81425&edit=1 ID: 81425 Updated by: sjon@php.net Reported by: Kai dot Habel at duofaktur dot de Summary: exit being ignored in loops -Status: Open +Status: Feedback Type: Bug Package: *General Issues Operating System: Centos 8 PHP Version: 8.0.10 Block user comment: N Private report: N New Comment: so what extensions do you use? I find it highly unlikely your Test script outputs 14 as reported (esp since $a=2). Can you try running with php -n to ensure you disable any extensions? Previous Comments: ------------------------------------------------------------------------ [2021-09-08 13:24:06] Kai dot Habel at duofaktur dot de No, we are not using uopz ------------------------------------------------------------------------ [2021-09-08 13:10:53] Kai dot Habel at duofaktur dot de We do in fact have this issue and are working around this for 3 days now with multiple developers. OS : Centos 7, Remi-Safe Repo and Centos 7/8 Plesk Repo. All systems are running in this issue. ------------------------------------------------------------------------ [2021-09-08 13:07:02] cmb@php.net Do you use uopz? ------------------------------------------------------------------------ [2021-09-08 12:58:53] girgias@php.net That's not true, see: https://3v4l.org/WZFU1 ------------------------------------------------------------------------ [2021-09-08 12:56:31] Kai dot Habel at duofaktur dot de Description: ------------ Prior to php 8.0 calls to exit or die worked within loops like foreach or switch. Since 8.0 these statements are totally ignored and this is causing hours and hours of work to use a goto call to end processing in each and every php file. Test script: --------------- $a = 2; switch($a) { case 1: echo "1"; exit; break; case 2: echo "2"; exit; break; case 3: echo "3"; exit; break; } echo "4"; Expected result: ---------------- 1 Actual result: -------------- 14 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81425&edit=1

« previous php.bugs (#236465) next »