3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.51 ms | 1400 KiB | 17 Q