3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); $i = 0; $time0 = microtime(1); while($i++ < 100000) echo'this is a test','this is a test','this is a test','this is a test','this is a test','this is a test'; $time1 = microtime(1); ob_end_clean(); echo round($c=($time1-$time0)*1000, 3), " milliseconds for commas without vars\n"; ob_start(); $i = 0; $time0 = microtime(1); while($i++ < 100000) echo'this is a test'.'this is a test'.'this is a test'.'this is a test'.'this is a test'.'this is a test'; $time1 = microtime(1); ob_end_clean(); echo round($d=($time1-$time0)*1000, 3), " milliseconds for dots without vars\n"; echo 'Difference: ', round(($d - $c) * 100 / $d, 1), "%\n"; ob_start(); $i = 0; $time0 = microtime(1); while($i++ < 100000) echo'this is a test',$i,'this is a test',$i,'this is a test',$i; $time1 = microtime(1); ob_end_clean(); echo round($c=($time1-$time0)*1000, 3), " milliseconds for commas with vars\n"; ob_start(); $i = 0; $time0 = microtime(1); while($i++ < 100000) echo'this is a test'.$i.'this is a test'.$i.'this is a test'.$i; $time1 = microtime(1); ob_end_clean(); echo round($d=($time1-$time0)*1000, 3), " milliseconds for dots with vars\n"; echo 'Difference: ', round(($d - $c) * 100 / $d, 1), "%\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 40
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
2 jumps found. (Code = 44) Position 1 = 86, Position 2 = 77
Branch analysis from position: 86
1 jumps found. (Code = 42) Position 1 = 115
Branch analysis from position: 115
2 jumps found. (Code = 44) Position 1 = 118, Position 2 = 109
Branch analysis from position: 118
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 109
2 jumps found. (Code = 44) Position 1 = 118, Position 2 = 109
Branch analysis from position: 118
Branch analysis from position: 109
Branch analysis from position: 77
2 jumps found. (Code = 44) Position 1 = 86, Position 2 = 77
Branch analysis from position: 86
Branch analysis from position: 77
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 40
Branch analysis from position: 44
Branch analysis from position: 40
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
Branch analysis from position: 8
filename:       /in/CYbdc
function name:  (null)
number of ops:  144
compiled vars:  !0 = $i, !1 = $time0, !2 = $time1, !3 = $c, !4 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ob_start'
          1        DO_ICALL                                                 
    4     2        ASSIGN                                                   !0, 0
    5     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !1, $7
    6     7      > JMP                                                      ->14
          8    >   ECHO                                                     'this+is+a+test'
          9        ECHO                                                     'this+is+a+test'
         10        ECHO                                                     'this+is+a+test'
         11        ECHO                                                     'this+is+a+test'
         12        ECHO                                                     'this+is+a+test'
         13        ECHO                                                     'this+is+a+test'
         14    >   POST_INC                                         ~9      !0
         15        IS_SMALLER                                               ~9, 100000
         16      > JMPNZ                                                    ~10, ->8
    7    17    >   INIT_FCALL                                               'microtime'
         18        SEND_VAL                                                 1
         19        DO_ICALL                                         $11     
         20        ASSIGN                                                   !2, $11
    8    21        INIT_FCALL                                               'ob_end_clean'
         22        DO_ICALL                                                 
    9    23        INIT_FCALL                                               'round'
         24        SUB                                              ~14     !2, !1
         25        MUL                                              ~15     ~14, 1000
         26        ASSIGN                                           ~16     !3, ~15
         27        SEND_VAL                                                 ~16
         28        SEND_VAL                                                 3
         29        DO_ICALL                                         $17     
         30        ECHO                                                     $17
         31        ECHO                                                     '+milliseconds+for+commas+without+vars%0A'
   11    32        INIT_FCALL                                               'ob_start'
         33        DO_ICALL                                                 
   12    34        ASSIGN                                                   !0, 0
   13    35        INIT_FCALL                                               'microtime'
         36        SEND_VAL                                                 1
         37        DO_ICALL                                         $20     
         38        ASSIGN                                                   !1, $20
   14    39      > JMP                                                      ->41
         40    >   ECHO                                                     'this+is+a+testthis+is+a+testthis+is+a+testthis+is+a+testthis+is+a+testthis+is+a+test'
         41    >   POST_INC                                         ~22     !0
         42        IS_SMALLER                                               ~22, 100000
         43      > JMPNZ                                                    ~23, ->40
   15    44    >   INIT_FCALL                                               'microtime'
         45        SEND_VAL                                                 1
         46        DO_ICALL                                         $24     
         47        ASSIGN                                                   !2, $24
   16    48        INIT_FCALL                                               'ob_end_clean'
         49        DO_ICALL                                                 
   17    50        INIT_FCALL                                               'round'
         51        SUB                                              ~27     !2, !1
         52        MUL                                              ~28     ~27, 1000
         53        ASSIGN                                           ~29     !4, ~28
         54        SEND_VAL                                                 ~29
         55        SEND_VAL                                                 3
         56        DO_ICALL                                         $30     
         57        ECHO                                                     $30
         58        ECHO                                                     '+milliseconds+for+dots+without+vars%0A'
   19    59        ECHO                                                     'Difference%3A+'
         60        INIT_FCALL                                               'round'
         61        SUB                                              ~31     !4, !3
         62        MUL                                              ~32     ~31, 100
         63        DIV                                              ~33     ~32, !4
         64        SEND_VAL                                                 ~33
         65        SEND_VAL                                                 1
         66        DO_ICALL                                         $34     
         67        ECHO                                                     $34
         68        ECHO                                                     '%25%0A'
   21    69        INIT_FCALL                                               'ob_start'
         70        DO_ICALL                                                 
   22    71        ASSIGN                                                   !0, 0
   23    72        INIT_FCALL                                               'microtime'
         73        SEND_VAL                                                 1
         74        DO_ICALL                                         $37     
         75        ASSIGN                                                   !1, $37
   24    76      > JMP                                                      ->83
         77    >   ECHO                                                     'this+is+a+test'
         78        ECHO                                                     !0
         79        ECHO                                                     'this+is+a+test'
         80        ECHO                                                     !0
         81        ECHO                                                     'this+is+a+test'
         82        ECHO                                                     !0
         83    >   POST_INC                                         ~39     !0
         84        IS_SMALLER                                               ~39, 100000
         85      > JMPNZ                                                    ~40, ->77
   25    86    >   INIT_FCALL                                               'microtime'
         87        SEND_VAL                                                 1
         88        DO_ICALL                                         $41     
         89        ASSIGN                                                   !2, $41
   26    90        INIT_FCALL                                               'ob_end_clean'
         91        DO_ICALL                                                 
   27    92        INIT_FCALL                                               'round'
         93        SUB                                              ~44     !2, !1
         94        MUL                                              ~45     ~44, 1000
         95        ASSIGN                                           ~46     !3, ~45
         96        SEND_VAL                                                 ~46
         97        SEND_VAL                                                 3
         98        DO_ICALL                                         $47     
         99        ECHO                                                     $47
        100        ECHO                                                     '+milliseconds+for+commas+with+vars%0A'
   29   101        INIT_FCALL                                               'ob_start'
        102        DO_ICALL                                                 
   30   103        ASSIGN                                                   !0, 0
   31   104        INIT_FCALL                                               'microtime'
        105        SEND_VAL                                                 1
        106        DO_ICALL                                         $50     
        107        ASSIGN                                                   !1, $50
   32   108      > JMP                                                      ->115
        109    >   CONCAT                                           ~52     'this+is+a+test', !0
        110        CONCAT                                           ~53     ~52, 'this+is+a+test'
        111        CONCAT                                           ~54     ~53, !0
        112        CONCAT                                           ~55     ~54, 'this+is+a+test'
        113        CONCAT                                           ~56     ~55, !0
        114        ECHO                                                     ~56
        115    >   POST_INC                                         ~57     !0
        116        IS_SMALLER                                               ~57, 100000
        117      > JMPNZ                                                    ~58, ->109
   33   118    >   INIT_FCALL                                               'microtime'
        119        SEND_VAL                                                 1
        120        DO_ICALL                                         $59     
        121        ASSIGN                                                   !2, $59
   34   122        INIT_FCALL                                               'ob_end_clean'
        123        DO_ICALL                                                 
   35   124        INIT_FCALL                                               'round'
        125        SUB                                              ~62     !2, !1
        126        MUL                                              ~63     ~62, 1000
        127        ASSIGN                                           ~64     !4, ~63
        128        SEND_VAL                                                 ~64
        129        SEND_VAL                                                 3
        130        DO_ICALL                                         $65     
        131        ECHO                                                     $65
        132        ECHO                                                     '+milliseconds+for+dots+with+vars%0A'
   37   133        ECHO                                                     'Difference%3A+'
        134        INIT_FCALL                                               'round'
        135        SUB                                              ~66     !4, !3
        136        MUL                                              ~67     ~66, 100
        137        DIV                                              ~68     ~67, !4
        138        SEND_VAL                                                 ~68
        139        SEND_VAL                                                 1
        140        DO_ICALL                                         $69     
        141        ECHO                                                     $69
        142        ECHO                                                     '%25%0A'
        143      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.43 ms | 1400 KiB | 21 Q