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