3v4l.org

run code in 500+ PHP versions simultaneously
<?php class MyDateTime extends DateTimeImmutable { public static function createFromFormat($format, $time, $timezone = null): self { $instance = parent::createFromFormat($format, $time, $timezone); var_dump($instance); return new self($instance->format('Y-m-d H:i:s.u'), $instance->getTimezone()); } } $now = MyDateTime::createFromFormat('U.u', '1678119664.436');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e8OHM
function name:  (null)
number of ops:  6
compiled vars:  !0 = $now
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                      'MyDateTime', 'createFromFormat'
          1        SEND_VAL                                                     'U.u'
          2        SEND_VAL                                                     '1678119664.436'
          3        DO_FCALL                                          0  $1      
          4        ASSIGN                                                       !0, $1
          5      > RETURN                                                       1

Class MyDateTime:
Function createfromformat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e8OHM
function name:  createFromFormat
number of ops:  25
compiled vars:  !0 = $format, !1 = $time, !2 = $timezone, !3 = $instance
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV_INIT                                            !2      null
    7     3        INIT_STATIC_METHOD_CALL                                      'createFromFormat'
          4        SEND_VAR_EX                                                  !0
          5        SEND_VAR_EX                                                  !1
          6        SEND_VAR_EX                                                  !2
          7        DO_FCALL                                          0  $4      
          8        ASSIGN                                                       !3, $4
    9     9        INIT_FCALL                                                   'var_dump'
         10        SEND_VAR                                                     !3
         11        DO_ICALL                                                     
   11    12        NEW                              self                $7      
         13        INIT_METHOD_CALL                                             !3, 'format'
         14        SEND_VAL_EX                                                  'Y-m-d+H%3Ai%3As.u'
         15        DO_FCALL                                          0  $8      
         16        SEND_VAR_NO_REF_EX                                           $8
         17        INIT_METHOD_CALL                                             !3, 'getTimezone'
         18        DO_FCALL                                          0  $9      
         19        SEND_VAR_NO_REF_EX                                           $9
         20        DO_FCALL                                          0          
         21        VERIFY_RETURN_TYPE                                           $7
         22      > RETURN                                                       $7
   12    23*       VERIFY_RETURN_TYPE                                           
         24*     > RETURN                                                       null

End of function createfromformat

End of class MyDateTime.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
130.03 ms | 478 KiB | 8 Q