3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); sleep(2); $calculated = microtime(true) - $start; echo "time_here: " . $calculated . "\n"; ?> # result: 1.9073486328125E-6
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/82pbR
function name:  (null)
number of ops:  17
compiled vars:  !0 = $start, !1 = $calculated
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    3     4        INIT_FCALL                                               'sleep'
          5        SEND_VAL                                                 2
          6        DO_ICALL                                                 
    4     7        INIT_FCALL                                               'microtime'
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $5      
         10        SUB                                              ~6      $5, !0
         11        ASSIGN                                                   !1, ~6
    5    12        CONCAT                                           ~8      'time_here%3A+', !1
         13        CONCAT                                           ~9      ~8, '%0A'
         14        ECHO                                                     ~9
    7    15        ECHO                                                     '%0A%23+result%3A+1.9073486328125E-6'
    8    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.22 ms | 1394 KiB | 17 Q