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

From: Date: Wed, 08 Sep 2021 13:24:06 +0000
Subject: Bug #81425 [Opn]: exit being ignored in loops
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236464@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 User updated by: Kai dot Habel at duofaktur dot de Reported by: Kai dot Habel at duofaktur dot de Summary: exit being ignored in loops Status: Open Type: Bug Package: *General Issues Operating System: Centos 8 PHP Version: 8.0.10 Block user comment: N Private report: N New Comment: No, we are not using uopz Previous Comments: ------------------------------------------------------------------------ [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 (#236464) next »