3v4l.org

run code in 300+ PHP versions simultaneously
<?php function somefunc() { return 'somestring'; } ob_start(); $time = microtime(1); $i = 0; while($i++ < 1000000) echo'somestring',somefunc(),'somestring'; ob_end_clean(); echo (microtime(1)-$time)." seconds for commas"; echo "\n"; ob_start(); $time = microtime(1); $i = 0; while($i++ < 1000000) echo'somestring'.somefunc().'somestring'; ob_end_clean(); echo (microtime(1)-$time)." seconds for dot";
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 = 16, Position 2 = 8
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 33
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 33
Branch analysis from position: 41
Branch analysis from position: 33
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 8
Branch analysis from position: 16
Branch analysis from position: 8
filename:       /in/3af31
function name:  (null)
number of ops:  50
compiled vars:  !0 = $time, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'ob_start'
          1        DO_ICALL                                                 
    6     2        INIT_FCALL                                               'microtime'
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    7     6        ASSIGN                                                   !1, 0
    8     7      > JMP                                                      ->13
          8    >   ECHO                                                     'somestring'
          9        INIT_FCALL                                               'somefunc'
         10        DO_FCALL                                      0  $6      
         11        ECHO                                                     $6
         12        ECHO                                                     'somestring'
         13    >   POST_INC                                         ~7      !1
         14        IS_SMALLER                                               ~7, 1000000
         15      > JMPNZ                                                    ~8, ->8
    9    16    >   INIT_FCALL                                               'ob_end_clean'
         17        DO_ICALL                                                 
   10    18        INIT_FCALL                                               'microtime'
         19        SEND_VAL                                                 1
         20        DO_ICALL                                         $10     
         21        SUB                                              ~11     $10, !0
         22        CONCAT                                           ~12     ~11, '+seconds+for+commas'
         23        ECHO                                                     ~12
   12    24        ECHO                                                     '%0A'
   14    25        INIT_FCALL                                               'ob_start'
         26        DO_ICALL                                                 
   15    27        INIT_FCALL                                               'microtime'
         28        SEND_VAL                                                 1
         29        DO_ICALL                                         $14     
         30        ASSIGN                                                   !0, $14
   16    31        ASSIGN                                                   !1, 0
   17    32      > JMP                                                      ->38
         33    >   INIT_FCALL                                               'somefunc'
         34        DO_FCALL                                      0  $17     
         35        CONCAT                                           ~18     'somestring', $17
         36        CONCAT                                           ~19     ~18, 'somestring'
         37        ECHO                                                     ~19
         38    >   POST_INC                                         ~20     !1
         39        IS_SMALLER                                               ~20, 1000000
         40      > JMPNZ                                                    ~21, ->33
   18    41    >   INIT_FCALL                                               'ob_end_clean'
         42        DO_ICALL                                                 
   19    43        INIT_FCALL                                               'microtime'
         44        SEND_VAL                                                 1
         45        DO_ICALL                                         $23     
         46        SUB                                              ~24     $23, !0
         47        CONCAT                                           ~25     ~24, '+seconds+for+dot'
         48        ECHO                                                     ~25
         49      > RETURN                                                   1

Function somefunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3af31
function name:  somefunc
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > RETURN                                                   'somestring'
          1*     > RETURN                                                   null

End of function somefunc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.62 ms | 1394 KiB | 21 Q