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 += $test; $numeric_merge = array_merge( $numeric_merge, $test ); } $assoc_concat = array(); $assoc_merge = array(); foreach( $assoc_tests as $test ) { $assoc_concat += array_flip( $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 = 13
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 28
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 28
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 13
filename:       /in/ADdAi
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, ->13
          5    > > FE_FETCH_R                                               $11, !4, ->13
   20     6    >   ASSIGN_OP                                     1          !2, !4
   21     7        INIT_FCALL                                               'array_merge'
          8        SEND_VAR                                                 !3
          9        SEND_VAR                                                 !4
         10        DO_ICALL                                         $13     
         11        ASSIGN                                                   !3, $13
   19    12      > JMP                                                      ->5
         13    >   FE_FREE                                                  $11
   24    14        ASSIGN                                                   !5, <array>
   25    15        ASSIGN                                                   !6, <array>
   26    16      > FE_RESET_R                                       $17     !1, ->28
         17    > > FE_FETCH_R                                               $17, !4, ->28
   27    18    >   INIT_FCALL                                               'array_flip'
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                         $18     
         21        ASSIGN_OP                                     1          !5, $18
   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                                                      ->17
         28    >   FE_FREE                                                  $17
   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:
159.96 ms | 1400 KiB | 19 Q