3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($x) {//注意非&参数 $x[0] = 8; $x[1] = 9; } $arr = array(1, 2); $alias = &$arr[1]; var_dump($arr); test($arr); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hlJda
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arr, !1 = $alias
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
    9     1        FETCH_DIM_W                                      $3      !0, 1
          2        ASSIGN_REF                                               !1, $3
   11     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   13     6        INIT_FCALL                                               'test'
          7        SEND_VAR                                                 !0
          8        DO_FCALL                                      0          
   15     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hlJda
function name:  test
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN_DIM                                               !0, 0
          2        OP_DATA                                                  8
    5     3        ASSIGN_DIM                                               !0, 1
          4        OP_DATA                                                  9
    6     5      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.39 ms | 1397 KiB | 16 Q