xref: /PHP-8.2/ext/opcache/tests/jit/assign_002.phpt (revision e9f783fc)
1--TEST--
2JIT ASSIGN: 002
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8;opcache.jit_debug=1
9--EXTENSIONS--
10opcache
11--FILE--
12<?php
13function foo() {
14    $ref1 = 2.3;
15    $ref2 =& $ref1;
16    $a = array();
17    $b = $a;
18    $c = $a;
19    $a = $ref1;
20    $x = $a;
21    var_dump($x, $b, $c);
22}
23foo();
24?>
25--EXPECT--
26float(2.3)
27array(0) {
28}
29array(0) {
30}
31