3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( 'test1' => array( '11', '22', '33', '44' ), 'test2' => array( '44', '55', '66', '77' ) ); $new = array(); $new2 = array(); foreach( $tests as $test ) { $new += array_flip( $test ); $new2 = array_merge( $new2, $test ); } print_r($new); print_r($new2);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/9PSKR
function name:  (null)
number of ops:  23
compiled vars:  !0 = $tests, !1 = $new, !2 = $new2, !3 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2        ASSIGN                                                   !2, <array>
   13     3      > FE_RESET_R                                       $7      !0, ->15
          4    > > FE_FETCH_R                                               $7, !3, ->15
   14     5    >   INIT_FCALL                                               'array_flip'
          6        SEND_VAR                                                 !3
          7        DO_ICALL                                         $8      
          8        ASSIGN_OP                                     1          !1, $8
   15     9        INIT_FCALL                                               'array_merge'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !2, $10
   13    14      > JMP                                                      ->4
         15    >   FE_FREE                                                  $7
   18    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
   19    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.88 ms | 1395 KiB | 19 Q