3v4l.org

run code in 300+ PHP versions simultaneously
<?php $css1 = ''; $time = microtime(true); for($i = 0; $i < 100000; $i++) { $css1 .= sprintf('foo %d', $i); } $time = microtime(true) - $time; echo number_format($time, 3) . 's'; $css2 = ''; $time = microtime(true); for($i = 0; $i < 100000; $i++) { $css2[] = sprintf('foo %d', $i); } $time = microtime(true) - $time; $css3 = implode('', $css2); echo number_format($time, 3) . 's';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 33
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 33
Branch analysis from position: 42
Branch analysis from position: 33
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
Branch analysis from position: 7
filename:       /in/KsLAD
function name:  (null)
number of ops:  59
compiled vars:  !0 = $css1, !1 = $time, !2 = $i, !3 = $css2, !4 = $css3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    4     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
    5     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->13
    6     7    >   INIT_FCALL                                               'sprintf'
          8        SEND_VAL                                                 'foo+%25d'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $9      
         11        ASSIGN_OP                                     8          !0, $9
    5    12        PRE_INC                                                  !2
         13    >   IS_SMALLER                                               !2, 100000
         14      > JMPNZ                                                    ~12, ->7
    8    15    >   INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $13     
         18        SUB                                              ~14     $13, !1
         19        ASSIGN                                                   !1, ~14
    9    20        INIT_FCALL                                               'number_format'
         21        SEND_VAR                                                 !1
         22        SEND_VAL                                                 3
         23        DO_ICALL                                         $16     
         24        CONCAT                                           ~17     $16, 's'
         25        ECHO                                                     ~17
   11    26        ASSIGN                                                   !3, ''
   12    27        INIT_FCALL                                               'microtime'
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                         $19     
         30        ASSIGN                                                   !1, $19
   13    31        ASSIGN                                                   !2, 0
         32      > JMP                                                      ->40
   14    33    >   INIT_FCALL                                               'sprintf'
         34        SEND_VAL                                                 'foo+%25d'
         35        SEND_VAR                                                 !2
         36        DO_ICALL                                         $23     
         37        ASSIGN_DIM                                               !3
         38        OP_DATA                                                  $23
   13    39        PRE_INC                                                  !2
         40    >   IS_SMALLER                                               !2, 100000
         41      > JMPNZ                                                    ~25, ->33
   16    42    >   INIT_FCALL                                               'microtime'
         43        SEND_VAL                                                 <true>
         44        DO_ICALL                                         $26     
         45        SUB                                              ~27     $26, !1
         46        ASSIGN                                                   !1, ~27
   17    47        INIT_FCALL                                               'implode'
         48        SEND_VAL                                                 ''
         49        SEND_VAR                                                 !3
         50        DO_ICALL                                         $29     
         51        ASSIGN                                                   !4, $29
   18    52        INIT_FCALL                                               'number_format'
         53        SEND_VAR                                                 !1
         54        SEND_VAL                                                 3
         55        DO_ICALL                                         $31     
         56        CONCAT                                           ~32     $31, 's'
         57        ECHO                                                     ~32
         58      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.06 ms | 1400 KiB | 21 Q