1--TEST-- 2Bug GH-8591 001 (JIT does not account for class re-compile) 3--EXTENSIONS-- 4opcache 5--INI-- 6opcache.enable=1 7opcache.enable_cli=1 8opcache.jit=1255 9opcache.file_update_protection=0 10opcache.revalidate_freq=0 11opcache.protect_memory=1 12opcache.preload={PWD}/gh8591-006.inc 13--SKIPIF-- 14<?php 15if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows'); 16?> 17--FILE-- 18<?php 19 20class Model extends AbstractModel 21{ 22 public function __construct() 23 { 24 for ($i = 0; $i < 10; $i++) { 25 $this->cast(); 26 } 27 } 28} 29 30new Model(); 31 32var_dump($x); 33 34print "OK"; 35?> 36--EXPECT-- 37int(1) 38OK 39