3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 10000; $start = microtime(true); for($i = 0; $i < $count; $i++) { $a .= 'a'; } printf("#1, result is %d, done in %f\n", $y, microtime(true) - $start); $start = microtime(true); for($i = 0; $i < $count; $i++) { $a .= "a"; } printf("#2, result is %d, done in %f\n", $y, microtime(true) - $start);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 7
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 26
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 26
Branch analysis from position: 30
Branch analysis from position: 26
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 7
Branch analysis from position: 11
Branch analysis from position: 7
filename:       /in/Yetkm
function name:  (null)
number of ops:  40
compiled vars:  !0 = $count, !1 = $start, !2 = $i, !3 = $a, !4 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10000
    3     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
    4     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->9
    6     7    >   ASSIGN_OP                                     8          !3, 'a'
    4     8        PRE_INC                                                  !2
          9    >   IS_SMALLER                                               !2, !0
         10      > JMPNZ                                                    ~11, ->7
    9    11    >   INIT_FCALL                                               'printf'
         12        SEND_VAL                                                 '%231%2C+result+is+%25d%2C+done+in+%25f%0A'
         13        SEND_VAR                                                 !4
         14        INIT_FCALL                                               'microtime'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $12     
         17        SUB                                              ~13     $12, !1
         18        SEND_VAL                                                 ~13
         19        DO_ICALL                                                 
   11    20        INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $15     
         23        ASSIGN                                                   !1, $15
   12    24        ASSIGN                                                   !2, 0
         25      > JMP                                                      ->28
   14    26    >   ASSIGN_OP                                     8          !3, 'a'
   12    27        PRE_INC                                                  !2
         28    >   IS_SMALLER                                               !2, !0
         29      > JMPNZ                                                    ~20, ->26
   17    30    >   INIT_FCALL                                               'printf'
         31        SEND_VAL                                                 '%232%2C+result+is+%25d%2C+done+in+%25f%0A'
         32        SEND_VAR                                                 !4
         33        INIT_FCALL                                               'microtime'
         34        SEND_VAL                                                 <true>
         35        DO_ICALL                                         $21     
         36        SUB                                              ~22     $21, !1
         37        SEND_VAL                                                 ~22
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.65 ms | 1400 KiB | 17 Q