3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $arr = array(); $arr2 = array(); $time = microtime(true); while($i < 1000000) { $i++; $arr[] = $i; } $time = microtime(true) - $time; echo 'took ' . number_format($time, 3)."\n"; $time = microtime(true); while($i < 100000) { $i++; array_push($arr2, $i); } $time = microtime(true) - $time; echo 'took ' . number_format($time, 3)."\n";
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 = 8
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 30
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 30
Branch analysis from position: 37
Branch analysis from position: 30
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 8
Branch analysis from position: 13
Branch analysis from position: 8
filename:       /in/oHeDK
function name:  (null)
number of ops:  50
compiled vars:  !0 = $i, !1 = $arr, !2 = $arr2, !3 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    7     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !3, $7
    9     7      > JMP                                                      ->11
   11     8    >   PRE_INC                                                  !0
   12     9        ASSIGN_DIM                                               !1
         10        OP_DATA                                                  !0
    9    11    >   IS_SMALLER                                               !0, 1000000
         12      > JMPNZ                                                    ~11, ->8
   14    13    >   INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $12     
         16        SUB                                              ~13     $12, !3
         17        ASSIGN                                                   !3, ~13
   16    18        INIT_FCALL                                               'number_format'
         19        SEND_VAR                                                 !3
         20        SEND_VAL                                                 3
         21        DO_ICALL                                         $15     
         22        CONCAT                                           ~16     'took+', $15
         23        CONCAT                                           ~17     ~16, '%0A'
         24        ECHO                                                     ~17
   17    25        INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $18     
         28        ASSIGN                                                   !3, $18
   18    29      > JMP                                                      ->35
   20    30    >   PRE_INC                                                  !0
   21    31        INIT_FCALL                                               'array_push'
         32        SEND_REF                                                 !2
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                                 
   18    35    >   IS_SMALLER                                               !0, 100000
         36      > JMPNZ                                                    ~22, ->30
   25    37    >   INIT_FCALL                                               'microtime'
         38        SEND_VAL                                                 <true>
         39        DO_ICALL                                         $23     
         40        SUB                                              ~24     $23, !3
         41        ASSIGN                                                   !3, ~24
   27    42        INIT_FCALL                                               'number_format'
         43        SEND_VAR                                                 !3
         44        SEND_VAL                                                 3
         45        DO_ICALL                                         $26     
         46        CONCAT                                           ~27     'took+', $26
         47        CONCAT                                           ~28     ~27, '%0A'
         48        ECHO                                                     ~28
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.35 ms | 1400 KiB | 19 Q