3v4l.org

run code in 300+ PHP versions simultaneously
<? class ListᐸTᐳ { private $items = []; public function add(T $item) { $this->items[] = $item; } } class T extends DateTime {} class ListᐸDateTime extends ListᐸTᐳ {} $list = new ListᐸDateTimeᐳ(); $list->add(new DateTime('now'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jL7hr
function name:  (null)
number of ops:  10
compiled vars:  !0 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'List%E1%90%B8DateTime%E1%90%B3'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'add'
          4        NEW                                              $4      'DateTime'
          5        SEND_VAL_EX                                              'now'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $4
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class ListᐸTᐳ:
Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jL7hr
function name:  add
number of ops:  5
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_W                                      $1      'items'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   10     4      > RETURN                                                   null

End of function add

End of class ListᐸTᐳ.

Class T: [no user functions]
Class ListᐸDateTime:
Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jL7hr
function name:  add
number of ops:  5
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_W                                      $1      'items'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   10     4      > RETURN                                                   null

End of function add

End of class ListᐸDateTime.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.49 ms | 1394 KiB | 13 Q