3v4l.org

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

Function somefunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2iMs4
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:
150.52 ms | 1403 KiB | 17 Q