3v4l.org

run code in 300+ PHP versions simultaneously
<?php function doNothing() {} $start = microtime(); for ($i=0;$i<1000;$i++) { doNothing(); } $end = microtime(); $start = explode(' ', $start); $start = $start[0] + $start[1]; $end = explode(' ', $end); $end = $end[0] + $end[1]; echo $end . ' - ' . $start . ' = ' . ($end - $start);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/G6KFn
function name:  (null)
number of ops:  38
compiled vars:  !0 = $start, !1 = $i, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'microtime'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    6     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->8
          5    >   INIT_FCALL                                               'donothing'
          6        DO_FCALL                                      0          
          7        PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 1000
          9      > JMPNZ                                                    ~8, ->5
    7    10    >   INIT_FCALL                                               'microtime'
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
    9    13        INIT_FCALL                                               'explode'
         14        SEND_VAL                                                 '+'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !0, $11
   10    18        FETCH_DIM_R                                      ~13     !0, 0
         19        FETCH_DIM_R                                      ~14     !0, 1
         20        ADD                                              ~15     ~13, ~14
         21        ASSIGN                                                   !0, ~15
   12    22        INIT_FCALL                                               'explode'
         23        SEND_VAL                                                 '+'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $17     
         26        ASSIGN                                                   !2, $17
   13    27        FETCH_DIM_R                                      ~19     !2, 0
         28        FETCH_DIM_R                                      ~20     !2, 1
         29        ADD                                              ~21     ~19, ~20
         30        ASSIGN                                                   !2, ~21
   14    31        CONCAT                                           ~23     !2, '+-+'
         32        CONCAT                                           ~24     ~23, !0
         33        CONCAT                                           ~25     ~24, '+%3D+'
         34        SUB                                              ~26     !2, !0
         35        CONCAT                                           ~27     ~25, ~26
         36        ECHO                                                     ~27
         37      > RETURN                                                   1

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

End of function donothing

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.95 ms | 1403 KiB | 18 Q