3v4l.org

run code in 500+ PHP versions simultaneously
<?php class FooBar { public static function baz() { function isGlobalFunction() { echo 'yep'; } return true; } } FooBar::baz(); var_dump(function_exists('isGlobalFunction')); isGlobalFunction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7tNtb
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                      'FooBar', 'baz'
          1        DO_FCALL                                          0          
   14     2        INIT_FCALL                                                   'var_dump'
          3        INIT_FCALL                                                   'function_exists'
          4        SEND_VAL                                                     'isGlobalFunction'
          5        DO_ICALL                                             $1      
          6        SEND_VAR                                                     $1
          7        DO_ICALL                                                     
   15     8        INIT_FCALL_BY_NAME                                           'isGlobalFunction'
          9        DO_FCALL                                          0          
         10      > RETURN                                                       1

Class FooBar:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7tNtb
function name:  baz
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   DECLARE_FUNCTION                                             'isglobalfunction'
    9     1      > RETURN                                                       <true>
   10     2*     > RETURN                                                       null


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

End of Dynamic Function 0

End of function baz

End of class FooBar.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.72 ms | 2894 KiB | 15 Q