3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.89 ms | 1400 KiB | 17 Q