3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(); $arr['all'][] = 'bar'; var_dump( $arr ); /* $arr = array( 'all' => 'foo' ); $arr['all'][] = 'bar'; var_dump( $arr ); */ $arr = array( 'all' => array() ); $arr['all'][] = 'bar'; var_dump( $arr ); $arr = array( 'all' => array( 'foo' ) ); $arr['all'][] = 'bar'; var_dump( $arr );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWT2F
function name:  (null)
number of ops:  22
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        FETCH_DIM_W                                      $2      !0, 'all'
          2        ASSIGN_DIM                                               $2
          3        OP_DATA                                                  'bar'
    5     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   11     7        ASSIGN                                                   !0, <array>
   12     8        FETCH_DIM_W                                      $6      !0, 'all'
          9        ASSIGN_DIM                                               $6
         10        OP_DATA                                                  'bar'
   13    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   15    14        ASSIGN                                                   !0, <array>
   16    15        FETCH_DIM_W                                      $10     !0, 'all'
         16        ASSIGN_DIM                                               $10
         17        OP_DATA                                                  'bar'
   17    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.17 ms | 1395 KiB | 15 Q