3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public function foo($t){ return __CLASS__; } } class Foo extends Bar{ public function foo($t) { return $t::foo($t); } } class Qux extends Foo { public function foo($t){ return __CLASS__; } } var_dump(Foo::foo('parent')); var_dump(Foo::foo('static'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cNCjo
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'Foo', 'foo'
          2        SEND_VAL                                                 'parent'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   26     6        INIT_FCALL                                               'var_dump'
          7        INIT_STATIC_METHOD_CALL                                  'Foo', 'foo'
          8        SEND_VAL                                                 'static'
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Bar:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cNCjo
function name:  foo
number of ops:  3
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1      > RETURN                                                   'Bar'
    6     2*     > RETURN                                                   null

End of function foo

End of class Bar.

Class Foo:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cNCjo
function name:  foo
number of ops:  7
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        FETCH_CLASS                                   0  $1      !0
          2        INIT_STATIC_METHOD_CALL                                  $1, 'foo'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5      > RETURN                                                   $2
   14     6*     > RETURN                                                   null

End of function foo

End of class Foo.

Class Qux:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cNCjo
function name:  foo
number of ops:  3
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1      > RETURN                                                   'Qux'
   22     2*     > RETURN                                                   null

End of function foo

End of class Qux.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.63 ms | 1396 KiB | 15 Q