zval *val;
EG(exception) = (void*)(uintptr_t)-1; /* prevent error reporting */
+ CG(in_compilation) = 1; /* prevent autoloading */
do {
ok = 1;
changed = 0;
}
} while (changed && !ok);
EG(exception) = NULL;
+ CG(in_compilation) = 0;
return ok;
}
--- /dev/null
+--TEST--
+No autoloading during constant resolution
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=-1
+opcache.preload={PWD}/preload_const_autoload.inc
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+===DONE===
+--EXPECTF--
+Warning: Can't preload class Test with unresolved initializer for constant C in %s on line %d
+===DONE===