3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=[]; function addToArray($arr,$val) { array_push($arr,["order_id"=>$val]); } addToArray($arr,"1234"); print_r($arr); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kh8q7
function name:  (null)
number of ops:  9
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'addtoarray'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '1234'
          4        DO_FCALL                                      0          
    9     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   10     8      > RETURN                                                   1

Function addtoarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kh8q7
function name:  addToArray
number of ops:  8
compiled vars:  !0 = $arr, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_FCALL                                               'array_push'
          3        SEND_REF                                                 !0
          4        INIT_ARRAY                                       ~2      !1, 'order_id'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
    7     7      > RETURN                                                   null

End of function addtoarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.15 ms | 1397 KiB | 18 Q