3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.99 ms | 1011 KiB | 15 Q