|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-09-28 05:38 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2021-09-28 05:38 UTC] requinix@php.net
[2021-09-28 10:11 UTC] nikic@php.net
[2021-09-28 13:52 UTC] mhkhung at gmail dot com
[2021-09-28 13:53 UTC] mhkhung at gmail dot com
-Status: Feedback
+Status: Closed
[2021-09-28 13:53 UTC] mhkhung at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 12:00:01 2025 UTC |
Description: ------------ This problem only happens on php 8. I tested latest 8.0.11 and 8.0.10 on Debian 11 and checked my sanity with php7.4 which will output the expected results. exit; appears to exit from current function only. The program will keep going. Expected result: exit will terminate the script. Test script: --------------- <?php function e() { echo "in e\n"; exit; } echo "before e\n"; e(); echo "after e\n"; Expected result: ---------------- before e in e Actual result: -------------- before e in e after e