3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(defined('B')) { function b() { echo "hello from `".__FUNCTION__."`\n"; } } echo function_exists("b") ? "b is defined\n" : "b is not defined\n"; a(); echo function_exists("b") ? "b is defined\n" : "b is not defined\n"; b(); a(); echo function_exists("b") ? "b is defined\n" : "b is not defined\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
Branch analysis from position: 31
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
Branch analysis from position: 19
Branch analysis from position: 3
filename:       /in/LRVrR
function name:  (null)
number of ops:  34
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DEFINED                                                  'B'
          1      > JMPZ                                                     ~0, ->3
    4     2    >   DECLARE_FUNCTION                                         'b'
    9     3    >   INIT_FCALL                                               'function_exists'
          4        SEND_VAL                                                 'b'
          5        DO_ICALL                                         $1      
          6      > JMPZ                                                     $1, ->9
          7    >   QM_ASSIGN                                        ~2      'b+is+defined%0A'
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~2      'b+is+not+defined%0A'
         10    >   ECHO                                                     ~2
   10    11        INIT_FCALL_BY_NAME                                       'a'
         12        DO_FCALL                                      0          
   11    13        INIT_FCALL                                               'function_exists'
         14        SEND_VAL                                                 'b'
         15        DO_ICALL                                         $4      
         16      > JMPZ                                                     $4, ->19
         17    >   QM_ASSIGN                                        ~5      'b+is+defined%0A'
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~5      'b+is+not+defined%0A'
         20    >   ECHO                                                     ~5
   12    21        INIT_FCALL_BY_NAME                                       'b'
         22        DO_FCALL                                      0          
   14    23        INIT_FCALL_BY_NAME                                       'a'
         24        DO_FCALL                                      0          
   15    25        INIT_FCALL                                               'function_exists'
         26        SEND_VAL                                                 'b'
         27        DO_ICALL                                         $8      
         28      > JMPZ                                                     $8, ->31
         29    >   QM_ASSIGN                                        ~9      'b+is+defined%0A'
         30      > JMP                                                      ->32
         31    >   QM_ASSIGN                                        ~9      'b+is+not+defined%0A'
         32    >   ECHO                                                     ~9
         33      > RETURN                                                   1

Function %00b%2Fin%2FLRVrR%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LRVrR
function name:  b
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'hello+from+%60b%60%0A'
    6     1      > RETURN                                                   null

End of function %00b%2Fin%2FLRVrR%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.16 ms | 1400 KiB | 15 Q