3v4l.org

run code in 500+ PHP versions simultaneously
<?php abstract class A { protected const c = null; abstract protected static function fs(); abstract protected function f(); } class B extends A { public function __construct(C $c) { var_dump(C::fs()); var_dump($c->f()); var_dump(C::C); } protected static function fs() {} protected function f() {} } class C extends A { protected const C = 'C::C'; protected static function fs() { return __METHOD__; } protected function f() { return __METHOD__; } } new B(new C);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lU3i
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   33     0  E >   NEW                                                  $0      'B'
          1        NEW                                                  $1      'C'
          2        DO_FCALL                                          0          
          3        SEND_VAR_NO_REF_EX                                           $1
          4        DO_FCALL                                          0          
          5        FREE                                                         $0
          6      > RETURN                                                       1

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

End of function fs

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

End of function f

End of class A.

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lU3i
function name:  __construct
number of ops:  16
compiled vars:  !0 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
   13     1        INIT_FCALL                                                   'var_dump'
          2        INIT_STATIC_METHOD_CALL                                      'C', 'fs'
          3        DO_FCALL                                          0  $1      
          4        SEND_VAR                                                     $1
          5        DO_ICALL                                                     
   14     6        INIT_FCALL                                                   'var_dump'
          7        INIT_METHOD_CALL                                             !0, 'f'
          8        DO_FCALL                                          0  $3      
          9        SEND_VAR                                                     $3
         10        DO_ICALL                                                     
   15    11        INIT_FCALL                                                   'var_dump'
         12        FETCH_CLASS_CONSTANT                                 ~5      'C', 'C'
         13        SEND_VAL                                                     ~5
         14        DO_ICALL                                                     
   16    15      > RETURN                                                       null

End of function __construct

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

End of function fs

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

End of function f

End of class B.

Class C:
Function fs:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lU3i
function name:  fs
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   26     0  E > > RETURN                                                       'C%3A%3Afs'
   27     1*     > RETURN                                                       null

End of function fs

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lU3i
function name:  f
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   29     0  E > > RETURN                                                       'C%3A%3Af'
   30     1*     > RETURN                                                       null

End of function f

End of class C.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.99 ms | 2354 KiB | 14 Q