3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function get() { return self(); } public function sauce() { print 'dafd'; } } class B extends A { public function pizza() { print 'oh noes'; } } $a = A::get(); $b = B::get(); $a->sauce(); $b->sauce(); $b->pizza();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ps23B
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'get'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
   16     3        INIT_STATIC_METHOD_CALL                                  'B', 'get'
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !1, $4
   17     6        INIT_METHOD_CALL                                         !0, 'sauce'
          7        DO_FCALL                                      0          
   18     8        INIT_METHOD_CALL                                         !1, 'sauce'
          9        DO_FCALL                                      0          
   19    10        INIT_METHOD_CALL                                         !1, 'pizza'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Class A:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ps23B
function name:  get
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'self'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
    5     3*     > RETURN                                                   null

End of function get

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

End of function sauce

End of class A.

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

End of function pizza

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ps23B
function name:  get
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'self'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
    5     3*     > RETURN                                                   null

End of function get

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

End of function sauce

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.14 ms | 1399 KiB | 13 Q