3v4l.org

run code in 300+ PHP versions simultaneously
<?php class BaseClass { public function foo() { var_dump(class_exists("ProjectManagementConfig")); echo ProjectManagementConfig::FOO; } } class ProjectManagementConfig extends BaseClass { const FOO = "Bar"; } $pmc = new ProjectManagementConfig; $pmc->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Um2JM
function name:  (null)
number of ops:  6
compiled vars:  !0 = $pmc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'ProjectManagementConfig'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class BaseClass:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Um2JM
function name:  foo
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'class_exists'
          2        SEND_VAL                                                 'ProjectManagementConfig'
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    6     6        FETCH_CLASS_CONSTANT                             ~2      'ProjectManagementConfig', 'FOO'
          7        ECHO                                                     ~2
    7     8      > RETURN                                                   null

End of function foo

End of class BaseClass.

Class ProjectManagementConfig:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Um2JM
function name:  foo
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'class_exists'
          2        SEND_VAL                                                 'ProjectManagementConfig'
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    6     6        FETCH_CLASS_CONSTANT                             ~2      'ProjectManagementConfig', 'FOO'
          7        ECHO                                                     ~2
    7     8      > RETURN                                                   null

End of function foo

End of class ProjectManagementConfig.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.45 ms | 1396 KiB | 17 Q