3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startTime = microtime(true); $outerLoop = 1000000000; $innerLoop = 1; $mod = 1; for($i = 0; $i < $outerLoop; $i++) { for($j = 0; $j < $innerLoop; $j++) { $mod = ($mod + 1) % 3; } } $endTime = microtime(true); $seconds = ($endTime - $startTime); echo "Done. Took: $seconds\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 9
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 11
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 9
Branch analysis from position: 20
Branch analysis from position: 9
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 11
Branch analysis from position: 17
Branch analysis from position: 11
filename:       /in/KgBCv
function name:  (null)
number of ops:  31
compiled vars:  !0 = $startTime, !1 = $outerLoop, !2 = $innerLoop, !3 = $mod, !4 = $i, !5 = $j, !6 = $endTime, !7 = $seconds
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $8      
          3        ASSIGN                                                   !0, $8
    5     4        ASSIGN                                                   !1, 1000000000
    6     5        ASSIGN                                                   !2, 1
    8     6        ASSIGN                                                   !3, 1
   10     7        ASSIGN                                                   !4, 0
          8      > JMP                                                      ->18
   11     9    >   ASSIGN                                                   !5, 0
         10      > JMP                                                      ->15
   12    11    >   ADD                                              ~15     !3, 1
         12        MOD                                              ~16     ~15, 3
         13        ASSIGN                                                   !3, ~16
   11    14        PRE_INC                                                  !5
         15    >   IS_SMALLER                                               !5, !2
         16      > JMPNZ                                                    ~19, ->11
   10    17    >   PRE_INC                                                  !4
         18    >   IS_SMALLER                                               !4, !1
         19      > JMPNZ                                                    ~21, ->9
   16    20    >   INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $22     
         23        ASSIGN                                                   !6, $22
   18    24        SUB                                              ~24     !6, !0
         25        ASSIGN                                                   !7, ~24
   19    26        ROPE_INIT                                     3  ~27     'Done.+Took%3A+'
         27        ROPE_ADD                                      1  ~27     ~27, !7
         28        ROPE_END                                      2  ~26     ~27, '%0A'
         29        ECHO                                                     ~26
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
235.54 ms | 1396 KiB | 15 Q