3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.05 ms | 1400 KiB | 17 Q