3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP // If you are using Zend Framework's autoloader // this example will crash with no errors on // the class_exists() call. interface MyInterface { public function refreshData(); } abstract class MyAbstract implements MyInterface { // THIS IS THE ERROR... // the function should be 'public' //abstract protected function refreshData(); } class MyClass extends MyAbstract { public function refreshData() { print "am in refreshData"; } } //-------------------------------------------- if (class_exists('MyClass',true)) { $mine = new MyClass(); $mine->refreshData(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/SRKMm
function name:  (null)
number of ops:  13
compiled vars:  !0 = $mine
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'myabstract'
   18     1        DECLARE_CLASS                                            'myclass', 'myabstract'
   26     2        INIT_FCALL                                               'class_exists'
          3        SEND_VAL                                                 'MyClass'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $1      
          6      > JMPZ                                                     $1, ->12
   27     7    >   NEW                                              $2      'MyClass'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $2
   28    10        INIT_METHOD_CALL                                         !0, 'refreshData'
         11        DO_FCALL                                      0          
   29    12    > > RETURN                                                   1

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

End of function refreshdata

End of class MyInterface.

Class MyAbstract: [no user functions]
Class MyClass:
Function refreshdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SRKMm
function name:  refreshData
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ECHO                                                     'am+in+refreshData'
   23     1      > RETURN                                                   null

End of function refreshdata

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.43 ms | 1387 KiB | 15 Q