3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Testable { public function test(); } class window implements Testable { public function test() { echo 'window.test'; } } class home { public static function add(Testable $item) { $item->test(); } } $window = new window(); home::add($window);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o1qep
function name:  (null)
number of ops:  8
compiled vars:  !0 = $window
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'window'
   24     1        NEW                                              $1      'window'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   26     4        INIT_STATIC_METHOD_CALL                                  'home', 'add'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Testable:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o1qep
function name:  test
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null

End of function test

End of class Testable.

Class window:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o1qep
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'window.test'
   13     1      > RETURN                                                   null

End of function test

End of class window.

Class home:
Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o1qep
function name:  add
number of ops:  4
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        INIT_METHOD_CALL                                         !0, 'test'
          2        DO_FCALL                                      0          
   21     3      > RETURN                                                   null

End of function add

End of class home.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.72 ms | 1394 KiB | 13 Q