3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeParent { public function __construct(private DateTime $d) { } } class SomeChild extends SomeParent { 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/onscb
function name:  (null)
number of ops:  13
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     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
   19     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/onscb
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 run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/onscb
function name:  run
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     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
   15     5*     > RETURN                                                   null

End of function run

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/onscb
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 SomeChild.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.31 ms | 1011 KiB | 14 Q