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