3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array_fill(0, 200, 0); $time = microtime(true); for ($i = 0; $i <= 100000; $i++) { array_merge($array); } var_dump(microtime(true) - $time); $time = microtime(true); for ($i = 0; $i <= 100000; $i++) { array_values($array); } var_dump(microtime(true) - $time);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 12
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 31
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 31
Branch analysis from position: 37
Branch analysis from position: 31
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 12
Branch analysis from position: 18
Branch analysis from position: 12
filename:       /in/flUhf
function name:  (null)
number of ops:  45
compiled vars:  !0 = $array, !1 = $time, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'array_fill'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 200
          3        SEND_VAL                                                 0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    4     6        INIT_FCALL                                               'microtime'
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
    6    10        ASSIGN                                                   !2, 0
         11      > JMP                                                      ->16
    7    12    >   INIT_FCALL                                               'array_merge'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
    6    15        PRE_INC                                                  !2
         16    >   IS_SMALLER_OR_EQUAL                                      !2, 100000
         17      > JMPNZ                                                    ~10, ->12
   10    18    >   INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $11     
         22        SUB                                              ~12     $11, !1
         23        SEND_VAL                                                 ~12
         24        DO_ICALL                                                 
   12    25        INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $14     
         28        ASSIGN                                                   !1, $14
   14    29        ASSIGN                                                   !2, 0
         30      > JMP                                                      ->35
   15    31    >   INIT_FCALL                                               'array_values'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                                 
   14    34        PRE_INC                                                  !2
         35    >   IS_SMALLER_OR_EQUAL                                      !2, 100000
         36      > JMPNZ                                                    ~19, ->31
   18    37    >   INIT_FCALL                                               'var_dump'
         38        INIT_FCALL                                               'microtime'
         39        SEND_VAL                                                 <true>
         40        DO_ICALL                                         $20     
         41        SUB                                              ~21     $20, !1
         42        SEND_VAL                                                 ~21
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.36 ms | 1400 KiB | 23 Q