3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Testable { public function test(); } abstract class windows implements Testable { abstract function name(); } class window extends windows { public function name() { echo 'window'; } public function test() { echo $this->name() . '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/Q3nt1
function name:  (null)
number of ops:  9
compiled vars:  !0 = $window
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'windows'
   13     1        DECLARE_CLASS                                            'window', 'windows'
   34     2        NEW                                              $1      'window'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   36     5        INIT_STATIC_METHOD_CALL                                  'home', 'add'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function name

End of class windows.

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

End of function name

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q3nt1
function name:  test
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_METHOD_CALL                                         'name'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      $0, 'test'
          3        ECHO                                                     ~1
   23     4      > 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/Q3nt1
function name:  add
number of ops:  4
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   30     1        INIT_METHOD_CALL                                         !0, 'test'
          2        DO_FCALL                                      0          
   31     3      > RETURN                                                   null

End of function add

End of class home.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.92 ms | 1399 KiB | 13 Q