Bug #79948 [Com]: Exit in auto-prepended file does not abort PHP execution
| From: | weirdan at gmail dot com | Date: | Mon, 10 Aug 2020 10:09:51 +0000 |
| Subject: | Bug #79948 [Com]: Exit in auto-prepended file does not abort PHP execution | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-228483@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79948&edit=1
ID: 79948
Comment by: weirdan at gmail dot com
Reported by: weirdan at gmail dot com
Summary: Exit in auto-prepended file does not abort PHP
execution
Status: Closed
Type: Bug
Package: *General Issues
Operating System: Debian/sid, MacOS X
PHP Version: 8.0.0beta1
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
That was quick. Thanks, Nikita!
Previous Comments:
------------------------------------------------------------------------
[2020-08-10 09:15:28] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ee163161480f4196d618036728f4765de7139068
Log: Fixed bug #79948
------------------------------------------------------------------------
[2020-08-09 23:21:12] weirdan at gmail dot com
Description:
------------
When exit() is used in a file pointed to by auto_prepend_file directive it does not abort the
execution of PHP in PHP 8. It used to abort execution in PHP 7 (last tested with PHP 7.4.5).
Test script:
---------------
// prepend.php
<?php
var_dump('exiting');
exit(22);
var_dump('after exit');
?>
// main.php
<?php
var_dump('executing');
// run as php -dauto_prepend_file=prepend.php main.php
Expected result:
----------------
string(7) "exiting"
Actual result:
--------------
string(7) "exiting"
string(9) "executing"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79948&edit=1