3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_a = range(0, 1000000); $ts = microtime(true); $a = range(0, 1000000); for($i = 0; $i < count($a); $i++) { $_a[$i] = $_a[$i]; } echo microtime(true) - $ts; echo '------------------'; $ts = microtime(true); $a = range(0, 1000000); for($i = 0; $i < count($a); $i++) { $a[$i] = $a[$i]; } echo microtime(true) - $ts; echo '------------------'; $ts = microtime(true); $a = range(0, 1000000); for($i = 0, $c = count($a); $i < $c; $i++) { $a[$i] = $a[$i]; } echo microtime(true) - $ts; echo '------------------';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 16
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 40
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 70
Branch analysis from position: 70
2 jumps found. (Code = 44) Position 1 = 72, Position 2 = 66
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 66
2 jumps found. (Code = 44) Position 1 = 72, Position 2 = 66
Branch analysis from position: 72
Branch analysis from position: 66
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 40
Branch analysis from position: 47
Branch analysis from position: 40
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 16
Branch analysis from position: 23
Branch analysis from position: 16
filename:       /in/vq321
function name:  (null)
number of ops:  79
compiled vars:  !0 = $_a, !1 = $ts, !2 = $a, !3 = $i, !4 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1000000
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !0, $5
    6     5        INIT_FCALL                                               'microtime'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !1, $7
    8     9        INIT_FCALL                                               'range'
         10        SEND_VAL                                                 0
         11        SEND_VAL                                                 1000000
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !2, $9
    9    14        ASSIGN                                                   !3, 0
         15      > JMP                                                      ->20
   10    16    >   FETCH_DIM_R                                      ~13     !0, !3
         17        ASSIGN_DIM                                               !0, !3
         18        OP_DATA                                                  ~13
    9    19        PRE_INC                                                  !3
         20    >   COUNT                                            ~15     !2
         21        IS_SMALLER                                               !3, ~15
         22      > JMPNZ                                                    ~16, ->16
   13    23    >   INIT_FCALL                                               'microtime'
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $17     
         26        SUB                                              ~18     $17, !1
         27        ECHO                                                     ~18
   14    28        ECHO                                                     '------------------'
   17    29        INIT_FCALL                                               'microtime'
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $19     
         32        ASSIGN                                                   !1, $19
   19    33        INIT_FCALL                                               'range'
         34        SEND_VAL                                                 0
         35        SEND_VAL                                                 1000000
         36        DO_ICALL                                         $21     
         37        ASSIGN                                                   !2, $21
   20    38        ASSIGN                                                   !3, 0
         39      > JMP                                                      ->44
   21    40    >   FETCH_DIM_R                                      ~25     !2, !3
         41        ASSIGN_DIM                                               !2, !3
         42        OP_DATA                                                  ~25
   20    43        PRE_INC                                                  !3
         44    >   COUNT                                            ~27     !2
         45        IS_SMALLER                                               !3, ~27
         46      > JMPNZ                                                    ~28, ->40
   24    47    >   INIT_FCALL                                               'microtime'
         48        SEND_VAL                                                 <true>
         49        DO_ICALL                                         $29     
         50        SUB                                              ~30     $29, !1
         51        ECHO                                                     ~30
   25    52        ECHO                                                     '------------------'
   28    53        INIT_FCALL                                               'microtime'
         54        SEND_VAL                                                 <true>
         55        DO_ICALL                                         $31     
         56        ASSIGN                                                   !1, $31
   30    57        INIT_FCALL                                               'range'
         58        SEND_VAL                                                 0
         59        SEND_VAL                                                 1000000
         60        DO_ICALL                                         $33     
         61        ASSIGN                                                   !2, $33
   31    62        ASSIGN                                                   !3, 0
         63        COUNT                                            ~36     !2
         64        ASSIGN                                                   !4, ~36
         65      > JMP                                                      ->70
   32    66    >   FETCH_DIM_R                                      ~39     !2, !3
         67        ASSIGN_DIM                                               !2, !3
         68        OP_DATA                                                  ~39
   31    69        PRE_INC                                                  !3
         70    >   IS_SMALLER                                               !3, !4
         71      > JMPNZ                                                    ~41, ->66
   35    72    >   INIT_FCALL                                               'microtime'
         73        SEND_VAL                                                 <true>
         74        DO_ICALL                                         $42     
         75        SUB                                              ~43     $42, !1
         76        ECHO                                                     ~43
   36    77        ECHO                                                     '------------------'
         78      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.53 ms | 1392 KiB | 17 Q