3v4l.org

run code in 500+ PHP versions simultaneously
<?php class SomeParent { public function __construct(private DateTime $d) { } } class SomeChild extends SomeParent { public function __construct(private DateTime $d) { parent::__construct($d); } public function run() { return $this->d->format('Y-m-d'); } } $c = new SomeChild(new DateTime('now')); var_dump($c->run());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6uYU7
function name:  (null)
number of ops:  13
compiled vars:  !0 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   NEW                                                  $1      'SomeChild'
          1        NEW                                                  $2      'DateTime'
          2        SEND_VAL_EX                                                  'now'
          3        DO_FCALL                                          0          
          4        SEND_VAR_NO_REF_EX                                           $2
          5        DO_FCALL                                          0          
          6        ASSIGN                                                       !0, $1
   24     7        INIT_FCALL                                                   'var_dump'
          8        INIT_METHOD_CALL                                             !0, 'run'
          9        DO_FCALL                                          0  $6      
         10        SEND_VAR                                                     $6
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

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

End of function __construct

End of class SomeParent.

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

End of function __construct

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6uYU7
function name:  run
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E >   FETCH_OBJ_R                                          ~0      'd'
          1        INIT_METHOD_CALL                                             ~0, 'format'
          2        SEND_VAL_EX                                                  'Y-m-d'
          3        DO_FCALL                                          0  $1      
          4      > RETURN                                                       $1
   20     5*     > RETURN                                                       null

End of function run

End of class SomeChild.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.2 ms | 1163 KiB | 14 Q