3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GetFormattedMicroTime($timestamp = false) { if(!$timestamp) $timestamp = microtime(true); sprintf('%.f', $timestamp); return DateTime::createFromFormat('U.u',sprintf('%.f', $timestamp))->format('Y-m-d\TH:i:s.u'); } $test = GetFormattedMicroTime(); print_r($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qrcIN
function name:  (null)
number of ops:  7
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'getformattedmicrotime'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
    9     3        INIT_FCALL                                               'print_r'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function getformattedmicrotime:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/qrcIN
function name:  GetFormattedMicroTime
number of ops:  24
compiled vars:  !0 = $timestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      <false>
    3     1        BOOL_NOT                                         ~1      !0
          2      > JMPZ                                                     ~1, ->7
    4     3    >   INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    5     7    >   INIT_FCALL                                               'sprintf'
          8        SEND_VAL                                                 '%25.f'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
    6    11        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         12        SEND_VAL                                                 'U.u'
         13        INIT_FCALL                                               'sprintf'
         14        SEND_VAL                                                 '%25.f'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $5      
         17        SEND_VAR                                                 $5
         18        DO_FCALL                                      0  $6      
         19        INIT_METHOD_CALL                                         $6, 'format'
         20        SEND_VAL_EX                                              'Y-m-d%5CTH%3Ai%3As.u'
         21        DO_FCALL                                      0  $7      
         22      > RETURN                                                   $7
    7    23*     > RETURN                                                   null

End of function getformattedmicrotime

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.08 ms | 1399 KiB | 20 Q