3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iTime1 = microtime(true); for ($i = 0; $i < 1000000; $i++) { strlen(''); } $iTime1 = microtime(true) - $iTime1; echo 'all 1000000 times:<br />modulo 5%10: ' . $iTime1 . '<br />'; $iTime2 = microtime(true); for ($i = 0; $i < 1000000; $i++) { strlen('jiogjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'); } $iTime2 = microtime(true) - $iTime2; echo 'modulo 105%10: ' . $iTime2 . '<br />time1/time2: ' . $iTime1 / $iTime2;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 6
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 23
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 23
Branch analysis from position: 26
Branch analysis from position: 23
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 6
Branch analysis from position: 9
Branch analysis from position: 6
filename:       /in/aG2vc
function name:  (null)
number of ops:  37
compiled vars:  !0 = $iTime1, !1 = $i, !2 = $iTime2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->7
          6    >   PRE_INC                                                  !1
          7    >   IS_SMALLER                                               !1, 1000000
          8      > JMPNZ                                                    ~7, ->6
    7     9    >   INIT_FCALL                                               'microtime'
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $8      
         12        SUB                                              ~9      $8, !0
         13        ASSIGN                                                   !0, ~9
    8    14        CONCAT                                           ~11     'all+1000000+times%3A%3Cbr+%2F%3Emodulo+5%2510%3A+', !0
         15        CONCAT                                           ~12     ~11, '%3Cbr+%2F%3E'
         16        ECHO                                                     ~12
   10    17        INIT_FCALL                                               'microtime'
         18        SEND_VAL                                                 <true>
         19        DO_ICALL                                         $13     
         20        ASSIGN                                                   !2, $13
   11    21        ASSIGN                                                   !1, 0
         22      > JMP                                                      ->24
         23    >   PRE_INC                                                  !1
         24    >   IS_SMALLER                                               !1, 1000000
         25      > JMPNZ                                                    ~17, ->23
   14    26    >   INIT_FCALL                                               'microtime'
         27        SEND_VAL                                                 <true>
         28        DO_ICALL                                         $18     
         29        SUB                                              ~19     $18, !2
         30        ASSIGN                                                   !2, ~19
   15    31        CONCAT                                           ~21     'modulo+105%2510%3A+', !2
         32        CONCAT                                           ~22     ~21, '%3Cbr+%2F%3Etime1%2Ftime2%3A+'
         33        DIV                                              ~23     !0, !2
         34        CONCAT                                           ~24     ~22, ~23
         35        ECHO                                                     ~24
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.74 ms | 1400 KiB | 15 Q