1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 02:02:32 +01:00
Files
archived-php-src/ext/opcache/tests/bug78014.phpt

27 lines
671 B
PHP

--TEST--
Bug #78014 (Preloaded classes may depend on non-preloaded classes due to unresolved consts)
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
opcache.preload={PWD}/preload_bug78014.inc
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
class B extends A {
function foo(): int { return 24; }
}
$c = new C;
var_dump($c->foo());
?>
--EXPECTF--
Warning: Can't preload unlinked class C in %s on line %d
Warning: Can't preload class B with unresolved initializer for constant X in %s on line %d
Fatal error: Uncaught Error: Class 'C' not found in %sbug78014.php:5
Stack trace:
#0 {main}
thrown in %sbug78014.php on line 5