Home  >  Article  >  Backend Development  >  Can I write custom functions in PHP member methods?

Can I write custom functions in PHP member methods?

WBOY
WBOYOriginal
2016-09-06 08:42:551021browse

Can I write custom functions in PHP member methods?
I defined a function in a method, but an error was reported when calling it
This is the method that reported the error
Can I write custom functions in PHP member methods?
The error was reported as follows

Can I write custom functions in PHP member methods?

But I have another method that also writes functions and performs recursion, but no error is reported.

Can I write custom functions in PHP member methods?

This is the interface for calling these two methods

Can I write custom functions in PHP member methods?

Why is an error reported? Can anyone explain it or have a good way to deal with it

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