mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
d836046ab8
It is very hard to determine in advance whether class linking will fail due to missing dependencies in variance checks (#7314 attempts this). This patch takes an alternative approach where we try to perform inheritance on a copy of the class (zend_lazy_class_load) and then restore the original class if inheritance fails. The fatal error in that case is recorded and thrown as a warning later. Closes GH-7319.
7 lines
189 B
PHP
7 lines
189 B
PHP
<?php
|
|
spl_autoload_register(function($class) {
|
|
// Autoloader should not get called.
|
|
echo "Trying to autoload $class\n";
|
|
});
|
|
opcache_compile_file(__DIR__ . '/preload_variance.inc');
|