xref: /PHP-8.1/ext/opcache/tests/jit/inc_022.phpt (revision aa01684b)
1--TEST--
2JIT INC: 022
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8opcache.protect_memory=1
9;opcache.jit_debug=257
10--EXTENSIONS--
11opcache
12--FILE--
13<?php
14function inc($x) {
15    return ++$x;
16}
17function dec($x) {
18    return --$x;
19}
20var_dump(inc("abc"));
21var_dump(inc("5"));
22var_dump(inc(1.1));
23var_dump(dec("5"));
24var_dump(dec(1.1));
25?>
26--EXPECT--
27string(3) "abd"
28int(6)
29float(2.1)
30int(4)
31float(0.10000000000000009)
32