3v4l.org

run code in 300+ PHP versions simultaneously
<?php function doNothing() {} $start = microtime(); for ($i=0;$i<1000;$i++) { doNothing(); } $end = microtime(); var_dump($start); $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/t4qJl
function name:  (null)
number of ops:  41
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                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   11    16        INIT_FCALL                                               'explode'
         17        SEND_VAL                                                 '+'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !0, $12
   12    21        FETCH_DIM_R                                      ~14     !0, 0
         22        FETCH_DIM_R                                      ~15     !0, 1
         23        ADD                                              ~16     ~14, ~15
         24        ASSIGN                                                   !0, ~16
   14    25        INIT_FCALL                                               'explode'
         26        SEND_VAL                                                 '+'
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                         $18     
         29        ASSIGN                                                   !2, $18
   15    30        FETCH_DIM_R                                      ~20     !2, 0
         31        FETCH_DIM_R                                      ~21     !2, 1
         32        ADD                                              ~22     ~20, ~21
         33        ASSIGN                                                   !2, ~22
   16    34        CONCAT                                           ~24     !2, '+-+'
         35        CONCAT                                           ~25     ~24, !0
         36        CONCAT                                           ~26     ~25, '+%3D+'
         37        SUB                                              ~27     !2, !0
         38        CONCAT                                           ~28     ~26, ~27
         39        ECHO                                                     ~28
         40      > RETURN                                                   1

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