3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_1 = array('something1', 'foo'); $array_2 = array('something3', 'bar'); $array_3 = array(); $array_4 = array('something1', 'foobar'); $array_5 = "not an array"; foreach([$array_1,$array_2,$array_3,$array_4,$array_5] AS $array) { $final = array_merge((array)$array,(array)$final); }; print_r($final);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/u942D
function name:  (null)
number of ops:  25
compiled vars:  !0 = $array_1, !1 = $array_2, !2 = $array_3, !3 = $array_4, !4 = $array_5, !5 = $array, !6 = $final
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, <array>
    5     3        ASSIGN                                                   !3, <array>
    6     4        ASSIGN                                                   !4, 'not+an+array'
    8     5        INIT_ARRAY                                       ~12     !0
          6        ADD_ARRAY_ELEMENT                                ~12     !1
          7        ADD_ARRAY_ELEMENT                                ~12     !2
          8        ADD_ARRAY_ELEMENT                                ~12     !3
          9        ADD_ARRAY_ELEMENT                                ~12     !4
         10      > FE_RESET_R                                       $13     ~12, ->20
         11    > > FE_FETCH_R                                               $13, !5, ->20
    9    12    >   INIT_FCALL                                               'array_merge'
         13        CAST                                          7  ~14     !5
         14        SEND_VAL                                                 ~14
         15        CAST                                          7  ~15     !6
         16        SEND_VAL                                                 ~15
         17        DO_ICALL                                         $16     
         18        ASSIGN                                                   !6, $16
    8    19      > JMP                                                      ->11
         20    >   FE_FREE                                                  $13
   12    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !6
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.74 ms | 1395 KiB | 17 Q