3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = ''; $len = 100; $start = microtime(true); for ($i = 0; $i < $len; $i++) { $html .= 'a'; } var_dump(microtime(true) - $start); $html = ''; $start = microtime(true); $tmp = array(); for ($i = 0; $i < $len; $i++) { $tmp[] = 'a'; } $html = join('', $tmp); var_dump(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 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 27
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 27
Branch analysis from position: 32
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/iSif6
function name:  (null)
number of ops:  45
compiled vars:  !0 = $html, !1 = $len, !2 = $start, !3 = $i, !4 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, ''
    5     1        ASSIGN                                                   !1, 100
    6     2        INIT_FCALL                                               'microtime'
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
    8     6        ASSIGN                                                   !3, 0
          7      > JMP                                                      ->10
    9     8    >   ASSIGN_OP                                     8          !0, 'a'
    8     9        PRE_INC                                                  !3
         10    >   IS_SMALLER                                               !3, !1
         11      > JMPNZ                                                    ~12, ->8
   11    12    >   INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $13     
         16        SUB                                              ~14     $13, !2
         17        SEND_VAL                                                 ~14
         18        DO_ICALL                                                 
   14    19        ASSIGN                                                   !0, ''
   16    20        INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $17     
         23        ASSIGN                                                   !2, $17
   17    24        ASSIGN                                                   !4, <array>
   19    25        ASSIGN                                                   !3, 0
         26      > JMP                                                      ->30
   20    27    >   ASSIGN_DIM                                               !4
         28        OP_DATA                                                  'a'
   19    29        PRE_INC                                                  !3
         30    >   IS_SMALLER                                               !3, !1
         31      > JMPNZ                                                    ~23, ->27
   22    32    >   INIT_FCALL                                               'join'
         33        SEND_VAL                                                 ''
         34        SEND_VAR                                                 !4
         35        DO_ICALL                                         $24     
         36        ASSIGN                                                   !0, $24
   24    37        INIT_FCALL                                               'var_dump'
         38        INIT_FCALL                                               'microtime'
         39        SEND_VAL                                                 <true>
         40        DO_ICALL                                         $26     
         41        SUB                                              ~27     $26, !2
         42        SEND_VAL                                                 ~27
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.51 ms | 1466 KiB | 16 Q