3v4l.org

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

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.03 ms | 1396 KiB | 16 Q