1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
--TEST--
Bug #72014 (Including a file with anonymous classes multiple times leads to fatal error)
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
--EXTENSIONS--
opcache
--FILE--
<?php
file_put_contents(__DIR__ . "/bug72014.annon.php", <<<PHP
<?php
\$a = new class() { public \$testvar = "Foo\n"; };
echo \$a->testvar;
PHP
);
include(__DIR__ . "/bug72014.annon.php");
include(__DIR__ . "/bug72014.annon.php");
include(__DIR__ . "/bug72014.annon.php");
?>
--CLEAN--
<?php
@unlink(__DIR__ . "/bug72014.annon.php")
?>
--EXPECT--
Foo
Foo
Foo
|