3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ExtendsDateTime extends DateTime { public function __construct($datetime, $tz) { var_dump($datetime); } public static function createFromFormat($format, $datetime, $timezone = null) { return parent::createFromFormat($format, $datetime); } } $date = ExtendsDateTime::createFromFormat('Y-m-d', '2014-02-14'); var_dump($date instanceof ExtendsDateTime);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k5gDZ
function name:  (null)
number of ops:  10
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                  'ExtendsDateTime', 'createFromFormat'
          1        SEND_VAL                                                 'Y-m-d'
          2        SEND_VAL                                                 '2014-02-14'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
   13     5        INIT_FCALL                                               'var_dump'
          6        INSTANCEOF                                       ~3      !0, 'ExtendsDateTime'
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class ExtendsDateTime:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k5gDZ
function name:  __construct
number of ops:  6
compiled vars:  !0 = $datetime, !1 = $tz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    6     5      > RETURN                                                   null

End of function __construct

Function createfromformat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k5gDZ
function name:  createFromFormat
number of ops:  9
compiled vars:  !0 = $format, !1 = $datetime, !2 = $timezone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      null
    8     3        INIT_STATIC_METHOD_CALL                                  'createFromFormat'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $3      
          7      > RETURN                                                   $3
    9     8*     > RETURN                                                   null

End of function createfromformat

End of class ExtendsDateTime.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.65 ms | 1388 KiB | 15 Q