3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Internal declaration class Foo { public static function bar() { return 'static'; } } // Internal Usage class SomeController { public function view() { echo Foo::bar(); } } // Some extending application class MyFoo extends Foo { public static function bar() { return 'can\'t make internal methods use this.'; } } $c = new SomeController; $c->view();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dVieK
function name:  (null)
number of ops:  6
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   NEW                                              $1      'SomeController'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   35     3        INIT_METHOD_CALL                                         !0, 'view'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function bar

End of class Foo.

Class SomeController:
Function view:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dVieK
function name:  view
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'bar'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   19     3      > RETURN                                                   null

End of function view

End of class SomeController.

Class MyFoo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dVieK
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E > > RETURN                                                   'can%27t+make+internal+methods+use+this.'
   30     1*     > RETURN                                                   null

End of function bar

End of class MyFoo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.75 ms | 1394 KiB | 13 Q