3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Simple function to replicate PHP 5 behaviour */ function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } $time_start = microtime_float(); // Sleep for a while //usleep(100); $time_end = microtime_float(); $time = $time_end - $time_start; echo "Did nothing in $time seconds\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RhQHg
function name:  (null)
number of ops:  13
compiled vars:  !0 = $time_start, !1 = $time_end, !2 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'microtime_float'
          1        DO_FCALL                                      0  $3      
          2        ASSIGN                                                   !0, $3
   16     3        INIT_FCALL                                               'microtime_float'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   17     6        SUB                                              ~7      !1, !0
          7        ASSIGN                                                   !2, ~7
   19     8        ROPE_INIT                                     3  ~10     'Did+nothing+in+'
          9        ROPE_ADD                                      1  ~10     ~10, !2
         10        ROPE_END                                      2  ~9      ~10, '+seconds%0A'
         11        ECHO                                                     ~9
         12      > RETURN                                                   1

Function microtime_float:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RhQHg
function name:  microtime_float
number of ops:  16
compiled vars:  !0 = $usec, !1 = $sec
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '+'
          2        INIT_FCALL                                               'microtime'
          3        DO_ICALL                                         $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                         $3      
          6        FETCH_LIST_R                                     $4      $3, 0
          7        ASSIGN                                                   !0, $4
          8        FETCH_LIST_R                                     $6      $3, 1
          9        ASSIGN                                                   !1, $6
         10        FREE                                                     $3
    8    11        CAST                                          5  ~8      !0
         12        CAST                                          5  ~9      !1
         13        ADD                                              ~10     ~8, ~9
         14      > RETURN                                                   ~10
    9    15*     > RETURN                                                   null

End of function microtime_float

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.55 ms | 1399 KiB | 19 Q