3v4l.org

run code in 300+ PHP versions simultaneously
<?php function MergeArrays($ar1, $ar2, $ar3) { $array = array(); $arrays = array('ar1', 'ar2', 'ar3'); foreach($arrays as $name) { //print_r($$name); foreach($$name as $id=>$value) $array[$id] = $value; } return $array; } $a1 = array('a', 'b'); $a2 = array('c', 'd', 'e'); $a3 = array('f'); print_r(MergeArrays($a, $a2, $a3));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cv5d4
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a1, !1 = $a2, !2 = $a3, !3 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN                                                   !0, <array>
   16     1        ASSIGN                                                   !1, <array>
   17     2        ASSIGN                                                   !2, <array>
   19     3        INIT_FCALL                                               'print_r'
          4        INIT_FCALL                                               'mergearrays'
          5        SEND_VAR                                                 !3
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !2
          8        DO_FCALL                                      0  $7      
          9        SEND_VAR                                                 $7
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function mergearrays:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 14
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/cv5d4
function name:  MergeArrays
number of ops:  19
compiled vars:  !0 = $ar1, !1 = $ar2, !2 = $ar3, !3 = $array, !4 = $arrays, !5 = $name, !6 = $value, !7 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        ASSIGN                                                   !3, <array>
    5     4        ASSIGN                                                   !4, <array>
    6     5      > FE_RESET_R                                       $10     !4, ->16
          6    > > FE_FETCH_R                                               $10, !5, ->16
    9     7    >   FETCH_R                      local               ~11     !5
          8      > FE_RESET_R                                       $12     ~11, ->14
          9    > > FE_FETCH_R                                       ~13     $12, !6, ->14
         10    >   ASSIGN                                                   !7, ~13
   10    11        ASSIGN_DIM                                               !3, !7
         12        OP_DATA                                                  !6
    9    13      > JMP                                                      ->9
         14    >   FE_FREE                                                  $12
    6    15      > JMP                                                      ->6
         16    >   FE_FREE                                                  $10
   12    17      > RETURN                                                   !3
   13    18*     > RETURN                                                   null

End of function mergearrays

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.17 ms | 1403 KiB | 16 Q