xref: /PHP-8.1/ext/opcache/tests/jit/inc_obj_002.phpt (revision 831a1717)
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
11class Test {
12    function foo() {
13        $this->prop = PHP_INT_MAX - 5;
14        for ($i = 0; $i < 10; $i++) {
15            var_dump(++$this->prop);
16        }
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)
34