3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ia = array_fill(0, 10000, random_int(100,300)); $ia2 = array_fill(0, 10000, random_int(400,600)); $ia3 = array_fill(0, 10000, random_int(700,900)); $iaf = ""; $iaf2 = ""; $iaf3 = ""; $is = microtime(true); for($i = 0; $i < count($ia); $i++){ $iaf = $i; } $ie = microtime(true); echo (($ie - $is) * 1000)."\n"; $is2 = microtime(true); $ia2c = count($ia2); for($i2 = 0; $i2 < $ia2c; $i2++){ $iaf2 = $i2; } $ie2 = microtime(true); echo (($ie2 - $is2) * 1000)." (cached)\n"; $is3 = microtime(true); for($i3 = 0; $i3 < count($ia3); $i3++){ $iaf3 = $i3; } $ie3 = microtime(true); echo (($ie3 - $is3) * 1000)."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 39
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
2 jumps found. (Code = 44) Position 1 = 64, Position 2 = 60
Branch analysis from position: 64
1 jumps found. (Code = 42) Position 1 = 80
Branch analysis from position: 80
2 jumps found. (Code = 44) Position 1 = 83, Position 2 = 78
Branch analysis from position: 83
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 78
2 jumps found. (Code = 44) Position 1 = 83, Position 2 = 78
Branch analysis from position: 83
Branch analysis from position: 78
Branch analysis from position: 60
2 jumps found. (Code = 44) Position 1 = 64, Position 2 = 60
Branch analysis from position: 64
Branch analysis from position: 60
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 39
Branch analysis from position: 44
Branch analysis from position: 39
filename:       /in/WBFuK
function name:  (null)
number of ops:  92
compiled vars:  !0 = $ia, !1 = $ia2, !2 = $ia3, !3 = $iaf, !4 = $iaf2, !5 = $iaf3, !6 = $is, !7 = $i, !8 = $ie, !9 = $is2, !10 = $ia2c, !11 = $i2, !12 = $ie2, !13 = $is3, !14 = $i3, !15 = $ie3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'array_fill'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 10000
          3        INIT_FCALL                                               'random_int'
          4        SEND_VAL                                                 100
          5        SEND_VAL                                                 300
          6        DO_ICALL                                         $16     
          7        SEND_VAR                                                 $16
          8        DO_ICALL                                         $17     
          9        ASSIGN                                                   !0, $17
    4    10        INIT_FCALL                                               'array_fill'
         11        SEND_VAL                                                 0
         12        SEND_VAL                                                 10000
         13        INIT_FCALL                                               'random_int'
         14        SEND_VAL                                                 400
         15        SEND_VAL                                                 600
         16        DO_ICALL                                         $19     
         17        SEND_VAR                                                 $19
         18        DO_ICALL                                         $20     
         19        ASSIGN                                                   !1, $20
    5    20        INIT_FCALL                                               'array_fill'
         21        SEND_VAL                                                 0
         22        SEND_VAL                                                 10000
         23        INIT_FCALL                                               'random_int'
         24        SEND_VAL                                                 700
         25        SEND_VAL                                                 900
         26        DO_ICALL                                         $22     
         27        SEND_VAR                                                 $22
         28        DO_ICALL                                         $23     
         29        ASSIGN                                                   !2, $23
    7    30        ASSIGN                                                   !3, ''
    8    31        ASSIGN                                                   !4, ''
    9    32        ASSIGN                                                   !5, ''
   11    33        INIT_FCALL                                               'microtime'
         34        SEND_VAL                                                 <true>
         35        DO_ICALL                                         $28     
         36        ASSIGN                                                   !6, $28
   12    37        ASSIGN                                                   !7, 0
         38      > JMP                                                      ->41
   13    39    >   ASSIGN                                                   !3, !7
   12    40        PRE_INC                                                  !7
         41    >   COUNT                                            ~33     !0
         42        IS_SMALLER                                               !7, ~33
         43      > JMPNZ                                                    ~34, ->39
   15    44    >   INIT_FCALL                                               'microtime'
         45        SEND_VAL                                                 <true>
         46        DO_ICALL                                         $35     
         47        ASSIGN                                                   !8, $35
   16    48        SUB                                              ~37     !8, !6
         49        MUL                                              ~38     ~37, 1000
         50        CONCAT                                           ~39     ~38, '%0A'
         51        ECHO                                                     ~39
   18    52        INIT_FCALL                                               'microtime'
         53        SEND_VAL                                                 <true>
         54        DO_ICALL                                         $40     
         55        ASSIGN                                                   !9, $40
   19    56        COUNT                                            ~42     !1
         57        ASSIGN                                                   !10, ~42
   20    58        ASSIGN                                                   !11, 0
         59      > JMP                                                      ->62
   21    60    >   ASSIGN                                                   !4, !11
   20    61        PRE_INC                                                  !11
         62    >   IS_SMALLER                                               !11, !10
         63      > JMPNZ                                                    ~47, ->60
   23    64    >   INIT_FCALL                                               'microtime'
         65        SEND_VAL                                                 <true>
         66        DO_ICALL                                         $48     
         67        ASSIGN                                                   !12, $48
   24    68        SUB                                              ~50     !12, !9
         69        MUL                                              ~51     ~50, 1000
         70        CONCAT                                           ~52     ~51, '+%28cached%29%0A'
         71        ECHO                                                     ~52
   26    72        INIT_FCALL                                               'microtime'
         73        SEND_VAL                                                 <true>
         74        DO_ICALL                                         $53     
         75        ASSIGN                                                   !13, $53
   27    76        ASSIGN                                                   !14, 0
         77      > JMP                                                      ->80
   28    78    >   ASSIGN                                                   !5, !14
   27    79        PRE_INC                                                  !14
         80    >   COUNT                                            ~58     !2
         81        IS_SMALLER                                               !14, ~58
         82      > JMPNZ                                                    ~59, ->78
   30    83    >   INIT_FCALL                                               'microtime'
         84        SEND_VAL                                                 <true>
         85        DO_ICALL                                         $60     
         86        ASSIGN                                                   !15, $60
   31    87        SUB                                              ~62     !15, !13
         88        MUL                                              ~63     ~62, 1000
         89        CONCAT                                           ~64     ~63, '%0A'
         90        ECHO                                                     ~64
         91      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.06 ms | 1021 KiB | 16 Q