3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.65 ms | 1394 KiB | 13 Q