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 += $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 = 12
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/74ReZ
function name:  (null)
number of ops:  20
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, ->12
          4    > > FE_FETCH_R                                               $7, !3, ->12
   14     5    >   ASSIGN_OP                                     1          !1, !3
   15     6        INIT_FCALL                                               'array_merge'
          7        SEND_VAR                                                 !2
          8        SEND_VAR                                                 !3
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !2, $9
   13    11      > JMP                                                      ->4
         12    >   FE_FREE                                                  $7
   18    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   19    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.56 ms | 1395 KiB | 17 Q