3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numeric_tests = array( 'test1' => array( '11', '22', '33', '44' ), 'test2' => array( '44', '55', '66', '77' ) ); $assoc_tests = array( 'test1' => array( '11' => '11', '22' => '22', '33' => '33', '44' => '44' ), 'test2' => array( '44' => '44', '55' => '55', '66' => '66', '77' => '77' ) ); $numeric_concat = array(); $numeric_merge = array(); foreach( $numeric_tests as $test ) { $numeric_concat += array_flip( $test ); $numeric_merge = array_merge( $numeric_merge, $test ); } $assoc_concat = array(); $assoc_merge = array(); foreach( $assoc_tests as $test ) { $assoc_concat += $test; $assoc_merge = array_merge( $assoc_merge, $test ); } print_r($numeric_concat); print_r($numeric_merge); print_r($assoc_concat); print_r($assoc_merge);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 28
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 28
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 16
filename:       /in/mRO4i
function name:  (null)
number of ops:  42
compiled vars:  !0 = $numeric_tests, !1 = $assoc_tests, !2 = $numeric_concat, !3 = $numeric_merge, !4 = $test, !5 = $assoc_concat, !6 = $assoc_merge
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   17     2        ASSIGN                                                   !2, <array>
   18     3        ASSIGN                                                   !3, <array>
   19     4      > FE_RESET_R                                       $11     !0, ->16
          5    > > FE_FETCH_R                                               $11, !4, ->16
   20     6    >   INIT_FCALL                                               'array_flip'
          7        SEND_VAR                                                 !4
          8        DO_ICALL                                         $12     
          9        ASSIGN_OP                                     1          !2, $12
   21    10        INIT_FCALL                                               'array_merge'
         11        SEND_VAR                                                 !3
         12        SEND_VAR                                                 !4
         13        DO_ICALL                                         $14     
         14        ASSIGN                                                   !3, $14
   19    15      > JMP                                                      ->5
         16    >   FE_FREE                                                  $11
   24    17        ASSIGN                                                   !5, <array>
   25    18        ASSIGN                                                   !6, <array>
   26    19      > FE_RESET_R                                       $18     !1, ->28
         20    > > FE_FETCH_R                                               $18, !4, ->28
   27    21    >   ASSIGN_OP                                     1          !5, !4
   28    22        INIT_FCALL                                               'array_merge'
         23        SEND_VAR                                                 !6
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                         $20     
         26        ASSIGN                                                   !6, $20
   26    27      > JMP                                                      ->20
         28    >   FE_FREE                                                  $18
   31    29        INIT_FCALL                                               'print_r'
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                                 
   32    32        INIT_FCALL                                               'print_r'
         33        SEND_VAR                                                 !3
         34        DO_ICALL                                                 
   35    35        INIT_FCALL                                               'print_r'
         36        SEND_VAR                                                 !5
         37        DO_ICALL                                                 
   36    38        INIT_FCALL                                               'print_r'
         39        SEND_VAR                                                 !6
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.15 ms | 1400 KiB | 19 Q