gh8461-003.phpt 712 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --TEST--
  2. Bug GH-8461 003 (JIT does not account for class re-compile)
  3. --EXTENSIONS--
  4. opcache
  5. --INI--
  6. opcache.enable=1
  7. opcache.enable_cli=1
  8. opcache.jit_buffer_size=1M
  9. opcache.jit=1255
  10. opcache.file_update_protection=0
  11. opcache.revalidate_freq=0
  12. opcache.protect_memory=1
  13. --FILE--
  14. <?php
  15. // Checks that JITed code does not crash in --repeat 2 after the UniqueList
  16. // class is recompiled.
  17. require __DIR__ . '/gh8461-003.inc';
  18. class UniqueListLast extends UniqueList
  19. {
  20. public function __construct()
  21. {
  22. parent::__construct(self::B);
  23. }
  24. }
  25. for ($i = 0; $i < 10; $i++) {
  26. new UniqueListLast();
  27. }
  28. // mark the file as changed (important)
  29. touch(__DIR__ . '/gh8461-003.inc');
  30. print "OK";
  31. --EXPECT--
  32. OK