xref: /php-src/ext/opcache/tests/jit/gh8461-003.phpt (revision c16ad918)
1--TEST--
2Bug GH-8461 003 (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
12--FILE--
13<?php
14
15// Checks that JITed code does not crash in --repeat 2 after the UniqueList
16// class is recompiled.
17
18require __DIR__ . '/gh8461-003.inc';
19
20class UniqueListLast extends UniqueList
21{
22    public function __construct()
23    {
24        parent::__construct(self::B);
25    }
26}
27
28for ($i = 0; $i < 10; $i++) {
29    new UniqueListLast();
30}
31
32// mark the file as changed (important)
33touch(__DIR__ . '/gh8461-003.inc');
34
35print "OK";
36?>
37--EXPECT--
38OK
39