3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = new DateTimeImmutable("now"); class MyDateTime implements \DateTimeInterface { public function diff($datetime2, $absolute = false) { // TODO: Implement diff() method. } public function format($format) { // TODO: Implement format() method. } public function getOffset() { // TODO: Implement getOffset() method. } public function getTimestamp() { // TODO: Implement getTimestamp() method. } public function getTimezone() { // TODO: Implement getTimezone() method. } public function __wakeup() { // TODO: Implement __wakeup() method. } } $d2 = new MyDateTime; var_dump($d->diff($d2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SU1Xq
function name:  (null)
number of ops:  15
compiled vars:  !0 = $d, !1 = $d2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateTimeImmutable'
          1        SEND_VAL_EX                                              'now'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    5     4        DECLARE_CLASS                                            'mydatetime'
   42     5        NEW                                              $5      'MyDateTime'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   43     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'diff'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class MyDateTime:
Function diff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SU1Xq
function name:  diff
number of ops:  3
compiled vars:  !0 = $datetime2, !1 = $absolute
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
   11     2      > RETURN                                                   null

End of function diff

Function format:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SU1Xq
function name:  format
number of ops:  2
compiled vars:  !0 = $format
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   17     1      > RETURN                                                   null

End of function format

Function getoffset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SU1Xq
function name:  getOffset
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E > > RETURN                                                   null

End of function getoffset

Function gettimestamp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SU1Xq
function name:  getTimestamp
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E > > RETURN                                                   null

End of function gettimestamp

Function gettimezone:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SU1Xq
function name:  getTimezone
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E > > RETURN                                                   null

End of function gettimezone

Function __wakeup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SU1Xq
function name:  __wakeup
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E > > RETURN                                                   null

End of function __wakeup

End of class MyDateTime.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.16 ms | 1003 KiB | 14 Q