gh8591-006.phpt 645 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --TEST--
  2. Bug GH-8591 001 (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. opcache.preload={PWD}/gh8591-006.inc
  14. --SKIPIF--
  15. <?php
  16. if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
  17. ?>
  18. --FILE--
  19. <?php
  20. class Model extends AbstractModel
  21. {
  22. public function __construct()
  23. {
  24. for ($i = 0; $i < 10; $i++) {
  25. $this->cast();
  26. }
  27. }
  28. }
  29. new Model();
  30. var_dump($x);
  31. print "OK";
  32. --EXPECT--
  33. int(1)
  34. OK