PHP determines whether the function exists

王林
Release: 2023-02-24 22:16:01
Original
4493 people have browsed it

PHP determines whether the function exists

PHP determines whether the function exists

1. Create a new file

PHP determines whether the function exists

2. Enter the structure of the php web page (), as shown in the figure Shown:

PHP determines whether the function exists

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

PHP determines whether the function exists

4. Function_exists() Function: If the function has been defined, it returns TRUE. The syntax structure is as shown in the figure:

PHP determines whether the function exists

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

PHP determines whether the function exists

6. Run the web page and output the judgment result of the function_exists() function. The displayed result is as shown in the figure:

PHP determines whether the function exists

Note:

When When this configuration or compilation or compilation option disables a function, the function name may also exist (image is a ready-made example)

Recommended tutorial: PHP video tutorial

The above is the detailed content of PHP determines whether the function exists. 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