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