3v4l.org

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

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7kqJK
function name:  a
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > RETURN                                                   <array>
          1*     > RETURN                                                   null

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.09 ms | 1397 KiB | 16 Q