Home  >  Article  >  Backend Development  >  PHP回调函数到底是个啥,该怎么解决

PHP回调函数到底是个啥,该怎么解决

WBOY
WBOYOriginal
2016-06-13 11:42:35875browse

PHP回调函数到底是个啥
百度了一下,很多关于回调都说是用函数指针回调,然后一步一步的讲,最后归结到了C语言了,无语!难道这个回调就这样难理解?
我的理解回调,关键是这个回,什么呢回呢?有些人理解这个回就是函数内部再调用一个函数,我认为不是这样,而是自己调用自己,就象数学逻辑中的循环证明一样,比如
条件…………求证:a=b;
有时我们会犯这样的求证错误:因为b=a,所以a=b,相信被个人都犯过类似的错误
  而回调函数我的理解类似这样,
     function fn($a){
           $b=m;
           $c=$b+fn($b);
           return;
}
也不知我的理解对吗?

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