3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.2 ms | 1400 KiB | 21 Q