3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { protected $installationDependent = true; public static function m() { return self::$installationDependent; } } class b extends a { protected $installationDependent = false; } var_dump(a::m()); var_dump(b::m());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fEBCU
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_STATIC_METHOD_CALL                                  'a', 'm'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   18     5        INIT_FCALL                                               'var_dump'
          6        INIT_STATIC_METHOD_CALL                                  'b', 'm'
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class a:
Function m:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fEBCU
function name:  m
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'installationDependent'
          1      > RETURN                                                   ~0
   10     2*     > RETURN                                                   null

End of function m

End of class a.

Class b:
Function m:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fEBCU
function name:  m
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'installationDependent'
          1      > RETURN                                                   ~0
   10     2*     > RETURN                                                   null

End of function m

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.8 ms | 1395 KiB | 15 Q