3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [['el1','el2'],['el3','el4'],]; function add_el($data,$elem){ foreach($data as $ind=>&$ar){ $ar[] = $elem; } return $data; } $el = 'el new'; print_r(add_el($data,$el));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WncVe
function name:  (null)
number of ops:  10
compiled vars:  !0 = $data, !1 = $el
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, 'el+new'
   14     2        INIT_FCALL                                               'print_r'
          3        INIT_FCALL                                               'add_el'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function add_el:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/WncVe
function name:  add_el
number of ops:  11
compiled vars:  !0 = $data, !1 = $elem, !2 = $ar, !3 = $ind
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2      > FE_RESET_RW                                      $4      !0, ->8
          3    > > FE_FETCH_RW                                      ~5      $4, !2, ->8
          4    >   ASSIGN                                                   !3, ~5
    7     5        ASSIGN_DIM                                               !2
          6        OP_DATA                                                  !1
    6     7      > JMP                                                      ->3
          8    >   FE_FREE                                                  $4
    9     9      > RETURN                                                   !0
   10    10*     > RETURN                                                   null

End of function add_el

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.69 ms | 1398 KiB | 16 Q