Bug #79184 [NEW]: include() after set_error_handler() with opcache on/off

From: Date: Tue, 28 Jan 2020 16:25:14 +0000
Subject: Bug #79184 [NEW]: include() after set_error_handler() with opcache on/off
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225200@lists.php.net to get a copy of this message
From: x86xlat at gmail dot com Operating system: linux PHP version: 7.4.2 Package: opcache Bug Type: Bug Bug description:include() after set_error_handler() with opcache on/off Description: ------------ set_error_handler() seems to be ignored when using include() with opcache enabled. Test script: --------------- file a.php: <?php set_error_handler(function($errno, $errstr, $errfile, $errline) { throw new \ErrorException($errstr, 0, $errno, $errfile, $errline); }); include('./b.php'); file b.php: <?php $t{0} = 0; Expected result: ---------------- $ php -d opcache.enable_cli=0 a.php PHP Fatal error: Uncaught ErrorException: Array and string offset access syntax with curly braces is deprecated in /opt/src/111/b.php:2 Stack trace: #0 /opt/src/111/a.php(5): {closure}(8192, 'Array and strin...', '/opt/src/111/b....', 2, Array) #1 /opt/src/111/a.php(5): include() #2 {main} thrown in /opt/src/111/b.php on line 2 And the same for -d opcache.enable_cli=1. Actual result: -------------- $ php -d opcache.enable_cli=1 a.php PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /opt/src/111/b.php on line 2 -- Edit bug report at https://bugs.php.net/bug.php?id=79184&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79184&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79184&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79184&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79184&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79184&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79184&r=support Expected behavior: https://bugs.php.net/fix.php?id=79184&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79184&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79184&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79184&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79184&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79184&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79184&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79184&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79184&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79184&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79184&r=mysqlcfg

« previous php.bugs (#225200) next »