xref: /PHP-8.4/ext/opcache/tests/jit/inc_023.phpt (revision c16ad918)
1--TEST--
2PRE_INC/DEC refcounted typed property
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.protect_memory=1
8--FILE--
9<?php
10class Test {
11    public string $prop;
12}
13
14$test = new Test;
15$test->prop = "a";
16++$test->prop;
17--$test->prop;
18var_dump(++$test->prop);
19var_dump(--$test->prop);
20?>
21--EXPECTF--
22Deprecated: Decrement on non-numeric string has no effect and is deprecated in %s on line %d
23string(1) "c"
24
25Deprecated: Decrement on non-numeric string has no effect and is deprecated in %s on line %d
26string(1) "c"
27