3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GetFormattedMicroTime($timestamp = false) { if(!$timestamp) $timestamp = microtime(true); return DateTime::createFromFormat('U.u',sprintf('%.f', $timestamp))->format('Y-m-d\TH:i:s.u'); } $test = GetFormattedMicroTime(microtime(true)); print_r($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b5jKM
function name:  (null)
number of ops:  11
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'getformattedmicrotime'
          1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $1      
          4        SEND_VAR                                                 $1
          5        DO_FCALL                                      0  $2      
          6        ASSIGN                                                   !0, $2
    9     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > 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/b5jKM
function name:  GetFormattedMicroTime
number of ops:  20
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_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          8        SEND_VAL                                                 'U.u'
          9        INIT_FCALL                                               'sprintf'
         10        SEND_VAL                                                 '%25.f'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_FCALL                                      0  $5      
         15        INIT_METHOD_CALL                                         $5, 'format'
         16        SEND_VAL_EX                                              'Y-m-d%5CTH%3Ai%3As.u'
         17        DO_FCALL                                      0  $6      
         18      > RETURN                                                   $6
    6    19*     > RETURN                                                   null

End of function getformattedmicrotime

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.1 ms | 1399 KiB | 20 Q