Home > Article > Backend Development > 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.
#2. Then you need to enter the structure of the php web page according to the code shown ().
#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.
4. The function_exists() function: Returns TRUE if the function has been defined, as shown in the figure with its syntax structure.
#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.
#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.
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!