3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ public static function foo(){ echo "in a \n"; } public static function test(){ static::foo(); } } class B extends A{ public static function foo(){ echo "in b \n"; } } function getIt($instance){ $instance::test(); } getIt(new A); getIt(new B);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jUQRN
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'getit'
          1        NEW                                              $0      'A'
          2        DO_FCALL                                      0          
          3        SEND_VAR                                                 $0
          4        DO_FCALL                                      0          
   22     5        INIT_FCALL                                               'getit'
          6        NEW                                              $3      'B'
          7        DO_FCALL                                      0          
          8        SEND_VAR                                                 $3
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function getit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jUQRN
function name:  getIt
number of ops:  5
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        FETCH_CLASS                                   0  $1      !0
          2        INIT_STATIC_METHOD_CALL                                  $1, 'test'
          3        DO_FCALL                                      0          
   20     4      > RETURN                                                   null

End of function getit

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

End of function foo

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

End of function test

End of class A.

Class B:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jUQRN
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'in+b+%0A'
   15     1      > RETURN                                                   null

End of function foo

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

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.67 ms | 1403 KiB | 15 Q