[php-src] Issue #8846: Opcache corruption

From: Date: Wed, 22 Jun 2022 18:39:37 +0000
Subject: [php-src] Issue #8846: Opcache corruption
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241784@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8846 Author: vnsavage ### Description The following code: 1. Clear PHP Opcache 2. Add files: ``` $ cat test.php <?php include( 'test-class1.php' ); include( 'test-class2.php' ); $ cat test-class1.php <?php class test_class { public static $a = true; } $ cat test-class2.php <?php var_dump( test_class::$a ); class test_class { public static $a = true; } ``` 3. Issue a web request to test.php 4. Remove the include -> "include( 'test-class1.php' )" from test.php 5. Issue a web request to test.php again Expected: Got: Resulted in this output: ``` Fatal error: Uncaught Error: Class 'test_class' not found in test-class2.php:3 ``` But I expected this output instead: ``` bool(true) ``` ### PHP Version PHP 8.0 ### Operating System Linux

« previous php.bugs (#241784) next »