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 += 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 = 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 = 31
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 31
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
Branch analysis from position: 16
filename:       /in/JErqa
function name:  (null)
number of ops:  45
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, ->31
         20    > > FE_FETCH_R                                               $18, !4, ->31
   27    21    >   INIT_FCALL                                               'array_flip'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                         $19     
         24        ASSIGN_OP                                     1          !5, $19
   28    25        INIT_FCALL                                               'array_merge'
         26        SEND_VAR                                                 !6
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                         $21     
         29        ASSIGN                                                   !6, $21
   26    30      > JMP                                                      ->20
         31    >   FE_FREE                                                  $18
   31    32        INIT_FCALL                                               'print_r'
         33        SEND_VAR                                                 !2
         34        DO_ICALL                                                 
   32    35        INIT_FCALL                                               'print_r'
         36        SEND_VAR                                                 !3
         37        DO_ICALL                                                 
   35    38        INIT_FCALL                                               'print_r'
         39        SEND_VAR                                                 !5
         40        DO_ICALL                                                 
   36    41        INIT_FCALL                                               'print_r'
         42        SEND_VAR                                                 !6
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
250.06 ms | 1400 KiB | 19 Q