xref: /PHP-8.4/ext/opcache/tests/jit/jmpz_ex_001.phpt (revision c16ad918)
1--TEST--
2JIT JMPZ_EX: Operand needs to be freed even if same as result
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.protect_memory=1
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12class Test {
13    public $prop;
14    public function method() {
15        return $this->prop && $this->prop->method2();
16    }
17}
18
19class Test2 {
20    public function method2() {
21        return true;
22    }
23};
24
25$test = new Test;
26$test->prop = new Test2;
27var_dump($test->method());
28
29?>
30--EXPECT--
31bool(true)
32