3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a () { function b() { echo "I am b.\n"; } echo "I am a.\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();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
Branch analysis from position: 16
filename:       /in/fJYQb
function name:  (null)
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'b'
          2        DO_ICALL                                         $0      
          3      > JMPZ                                                     $0, ->6
          4    >   QM_ASSIGN                                        ~1      'b+is+defined%0A'
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~1      'b+is+not+defined%0A'
          7    >   ECHO                                                     ~1
   11     8        INIT_FCALL                                               'a'
          9        DO_FCALL                                      0          
   12    10        INIT_FCALL                                               'function_exists'
         11        SEND_VAL                                                 'b'
         12        DO_ICALL                                         $3      
         13      > JMPZ                                                     $3, ->16
         14    >   QM_ASSIGN                                        ~4      'b+is+defined%0A'
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~4      'b+is+not+defined%0A'
         17    >   ECHO                                                     ~4
   13    18        INIT_FCALL_BY_NAME                                       'b'
         19        DO_FCALL                                      0          
         20      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fJYQb
function name:  a
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_FUNCTION                                         'b'
    7     1        ECHO                                                     'I+am+a.%0A'
    8     2      > RETURN                                                   null

End of function a

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.54 ms | 1398 KiB | 16 Q