3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $time = strtotime('2015-10-28T08:22:20.458Z'); $date = new \DateTime(); //$date->setTimestamp($time); $date = $date::createFromFormat('U.u', $timestamp); echo $date->format('Y-m-d H:i:s.u');
based on A2Fth
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/E7lAO
function name:  (null)
number of ops:  18
compiled vars:  !0 = $time, !1 = $date, !2 = $timestamp
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   INIT_FCALL                                               'strtotime'
         1        SEND_VAL                                                 '2015-10-28T08%3A22%3A20.458Z'
         2        DO_ICALL                                         $3      
         3        ASSIGN                                                   !0, $3
   5     4        NEW                                              $5      :-4
         5        DO_FCALL                                      0          
         6        ASSIGN                                                   !1, $5
   7     7        FETCH_CLASS                                 512  :8      !1
         8        INIT_STATIC_METHOD_CALL                                  $8, 'createFromFormat'
         9        SEND_VAL_EX                                              'U.u'
        10        SEND_VAR_EX                                              !2
        11        DO_FCALL                                      0  $9      
        12        ASSIGN                                                   !1, $9
   8    13        INIT_METHOD_CALL                                         !1, 'format'
        14        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As.u'
        15        DO_FCALL                                      0  $11     
        16        ECHO                                                     $11
        17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.1.0