3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DateTimeAttribute extends DateTime { private $datetime = ''; public function __construct($datetime) { try { parent::__construct($datetime); } catch (Exception $e) {} $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/oq3H0
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'
   21     1        NEW                                              $1      'DateTimeAttribute'
          2        SEND_VAL_EX                                              '2013-04-01+23%3A40%3A06'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   23     5        ECHO                                                     !0
   24     6        ECHO                                                     '%0A'
   25     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 = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
filename:       /in/oq3H0
function name:  __construct
number of ops:  9
compiled vars:  !0 = $datetime, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    9     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > JMP                                                      ->6
   10     5  E > > CATCH                                       last         'Exception'
   12     6    >   ASSIGN_OBJ                                               'datetime'
          7        OP_DATA                                                  !0
   13     8      > 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/oq3H0
function name:  __toString
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   FETCH_OBJ_R                                      ~0      'datetime'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   18     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:
148.25 ms | 1386 KiB | 13 Q