3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(0, 250_000); $b = range(250_000, 500_000); $start = microtime(true); foreach(array_merge($a, $b) as $key => $item){ // } $elapsed = microtime(true) - $start; var_dump($elapsed);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/OmUb3
function name:  (null)
number of ops:  32
compiled vars:  !0 = $a, !1 = $b, !2 = $start, !3 = $item, !4 = $key, !5 = $elapsed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 250000
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !0, $6
    4     5        INIT_FCALL                                               'range'
          6        SEND_VAL                                                 250000
          7        SEND_VAL                                                 500000
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !1, $8
    7    10        INIT_FCALL                                               'microtime'
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !2, $10
    8    14        INIT_FCALL                                               'array_merge'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $12     
         18      > FE_RESET_R                                       $13     $12, ->22
         19    > > FE_FETCH_R                                       ~14     $13, !3, ->22
         20    >   ASSIGN                                                   !4, ~14
         21      > JMP                                                      ->19
         22    >   FE_FREE                                                  $13
   11    23        INIT_FCALL                                               'microtime'
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $16     
         26        SUB                                              ~17     $16, !2
         27        ASSIGN                                                   !5, ~17
   12    28        INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !5
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.74 ms | 1430 KiB | 17 Q