Home  >  Article  >  Backend Development  >  The method in the php class does not exist

The method in the php class does not exist

藏色散人
藏色散人Original
2019-10-25 09:14:584806browse

The method in the php class does not exist

The method in the php class does not exist? PHP determines whether a function in a class exists?

1. First, you need to create a new 246.php.

The method in the php class does not exist

#2. Then you need to enter the structure of the php web page according to the code shown ().

The method in the php class does not exist

#3. Then you need to declare the file type and encoding for PHP to interact with the browser according to the code shown in the figure.

The method in the php class does not exist

4. The function_exists() function: Returns TRUE if the function has been defined, as shown in the figure with its syntax structure.

The method in the php class does not exist

#5. Then you need to use the function_exists() function according to the code shown in the figure to determine whether the show() function has been defined.

The method in the php class does not exist

#6. Run the web page and output the judgment result of the function_exists() function. As shown in the figure, the function does not exist.

The method in the php class does not exist

For more PHP related knowledge, please visit PHP Chinese website!

The above is the detailed content of The method in the php class does not exist. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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