3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [1,2]; function f($b) { xdebug_debug_zval('b'); return [$b[1], $b[0]]; } xdebug_debug_zval('a'); $c = f($a); xdebug_debug_zval('c');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vXYiZ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL_BY_NAME                                       'xdebug_debug_zval'
          2        SEND_VAL_EX                                              'a'
          3        DO_FCALL                                      0          
    8     4        INIT_FCALL                                               'f'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !1, $4
    9     8        INIT_FCALL_BY_NAME                                       'xdebug_debug_zval'
          9        SEND_VAL_EX                                              'c'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vXYiZ
function name:  f
number of ops:  10
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL_BY_NAME                                       'xdebug_debug_zval'
          2        SEND_VAL_EX                                              'b'
          3        DO_FCALL                                      0          
    5     4        FETCH_DIM_R                                      ~2      !0, 1
          5        INIT_ARRAY                                       ~3      ~2
          6        FETCH_DIM_R                                      ~4      !0, 0
          7        ADD_ARRAY_ELEMENT                                ~3      ~4
          8      > RETURN                                                   ~3
    6     9*     > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.83 ms | 1397 KiB | 14 Q