bug67215.phpt 728 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Bug #67215 (php-cgi work with opcache, may be segmentation fault happen)
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.file_update_protection=0
  7. --EXTENSIONS--
  8. opcache
  9. --FILE--
  10. <?php
  11. $file_c = __DIR__ . "/bug67215.c.php";
  12. $file_p = __DIR__ . "/bug67215.p.php";
  13. file_put_contents($file_c, "<?php require '$file_p'; class c extends p {} ?>");
  14. file_put_contents($file_p, '<?php class p { protected $var = ""; } ?>');
  15. require $file_c;
  16. $a = new c();
  17. require $file_c;
  18. ?>
  19. --CLEAN--
  20. <?php
  21. $file_c = __DIR__ . "/bug67215.c.php";
  22. $file_p = __DIR__ . "/bug67215.p.php";
  23. unlink($file_c);
  24. unlink($file_p);
  25. ?>
  26. --EXPECTF--
  27. Fatal error: Cannot declare class c, because the name is already in use in %sbug67215.c.php on line %d