xref: /PHP-8.1/ext/opcache/tests/jit/gh8461-007.phpt (revision 6c254131)
1--TEST--
2Bug GH-8461 007 (JIT does not account for function re-compile)
3--EXTENSIONS--
4opcache
5--SKIPIF--
6<?php
7if (PHP_OS_FAMILY === "Windows") die("skip Windows does not support preloading");
8?>
9--INI--
10opcache.enable=1
11opcache.enable_cli=1
12opcache.jit_buffer_size=1M
13opcache.jit=1255
14opcache.file_update_protection=0
15opcache.revalidate_freq=0
16opcache.protect_memory=1
17opcache.preload={PWD}/gh8461-007.inc
18--FILE--
19<?php
20
21for ($i = 0; $i < 100; $i++) {
22    UniqueListLast::bar();
23}
24
25for ($i = 0; $i < 100; $i++) {
26    new UniqueListLast();
27}
28
29for ($i = 0; $i < 10; $i++) {
30    test();
31}
32
33print "OK";
34--EXPECT--
35OK
36