xref: /PHP-8.2/ext/opcache/tests/jit/inc_obj_002.phpt (revision 902d6439)
1--TEST--
2PRE_INC_OBJ: 002
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8opcache.protect_memory=1
9--FILE--
10<?php
11#[AllowDynamicProperties]
12class Test {
13    function foo() {
14        $this->prop = PHP_INT_MAX - 5;
15        for ($i = 0; $i < 10; $i++) {
16            var_dump(++$this->prop);
17        }
18    }
19}
20
21$test = new Test;
22$test->foo();
23?>
24--EXPECTF--
25int(%d)
26int(%d)
27int(%d)
28int(%d)
29int(%d)
30float(%f)
31float(%f)
32float(%f)
33float(%f)
34float(%f)
35