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-08-21'); echo $x;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U0m1J
function name:  (null)
number of ops:  7
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-08-21'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   23     5        ECHO                                                     !0
          6      > 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/U0m1J
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/U0m1J
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:
190.61 ms | 1395 KiB | 13 Q