xref: /PHP-8.3/ext/opcache/tests/jit/inc_obj_004.phpt (revision 912f0405)
1--TEST--
2PRE_INC_OBJ: 004
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
11class Test {
12    public $prop;
13    function foo() {
14        $this->prop = PHP_INT_MAX-5;
15        for ($i = 0; $i - 15; $i++) {
16            var_dump(++$this->prop);
17        }
18    }
19}
20$test = new Test;
21$test->foo();
22?>
23--EXPECTF--
24int(%d)
25int(%d)
26int(%d)
27int(%d)
28int(%d)
29float(%f)
30float(%f)
31float(%f)
32float(%f)
33float(%f)
34float(%f)
35float(%f)
36float(%f)
37float(%f)
38float(%f)
39