3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DateTimeAttribute extends DateTime { private $datetime = ''; public function __construct($datetime) { parent::__construct($datetime); $this->datetime = $datetime; } public function __toString() { return $this->datetime; } } $x = new DateTimeAttribute('2013-04-01 23:40:06'); echo $x; echo "\n"; echo $x->format('Y s');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ccrLM
function name:  (null)
number of ops:  12
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'datetimeattribute', 'datetime'
   19     1        NEW                                              $1      'DateTimeAttribute'
          2        SEND_VAL_EX                                              '2013-04-01+23%3A40%3A06'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   21     5        ECHO                                                     !0
   22     6        ECHO                                                     '%0A'
   23     7        INIT_METHOD_CALL                                         !0, 'format'
          8        SEND_VAL_EX                                              'Y+s'
          9        DO_FCALL                                      0  $4      
         10        ECHO                                                     $4
         11      > RETURN                                                   1

Class DateTimeAttribute:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ccrLM
function name:  __construct
number of ops:  7
compiled vars:  !0 = $datetime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   10     4        ASSIGN_OBJ                                               'datetime'
          5        OP_DATA                                                  !0
   11     6      > RETURN                                                   null

End of function __construct

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ccrLM
function name:  __toString
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_OBJ_R                                      ~0      'datetime'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   16     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function __tostring

End of class DateTimeAttribute.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152 ms | 1395 KiB | 13 Q