1. Declare the file type and encoding for PHP interaction with the browser, as shown in the figure:
2. function_exists( ) Function of the function: If the function has been defined, it returns TRUE. The syntax structure is as shown in the figure:
3. Use the function_exists() function to determine whether the show() function has been is defined, the code is as shown in the figure:
Run the web page, output the judgment result of the function_exists() function, and display the result as shown in the figure:
Recommended tutorial: PHP tutorial
The above is the detailed content of How to determine whether a function is defined in PHP. For more information, please follow other related articles on the PHP Chinese website!