Home > Backend Development > PHP Tutorial > How to determine whether a function is defined in PHP

How to determine whether a function is defined in PHP

王林
Release: 2023-04-07 19:36:02
Original
3050 people have browsed it

How to determine whether a function is defined in PHP

1. Declare the file type and encoding for PHP interaction with the browser, as shown in the figure:

How to determine whether a function is defined in PHP

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:

How to determine whether a function is defined in PHP

3. Use the function_exists() function to determine whether the show() function has been is defined, the code is as shown in the figure:

How to determine whether a function is defined in PHP

Run the web page, output the judgment result of the function_exists() function, and display the result as shown in the figure:

How to determine whether a function is defined in PHP

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template