xref: /php-src/ext/opcache/tests/jit/gh9011.phpt (revision 9d4f5f07)
1--TEST--
2GH-9011: Assertion failure with tracing JIT
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7--FILE--
8<?php
9$foo = [];
10$foo[] = new \Exception(); /* Native interface implemented Native instance */
11$foo[] = new class () implements \Stringable /* Native interface implemented User instance */
12{
13    public function __toString(): string
14    {
15        return "bar";
16    }
17};
18
19foreach ($foo as $baz) {
20    for ($i = 0; $i < 64; $i++) {
21        $baz->__toString();
22    }
23}
24?>
25DONE
26--EXPECT--
27DONE