在PHP 5.3之前如何使用匿名函数? [英] How to use anonymous functions before PHP 5.3?
本文介绍了在PHP 5.3之前如何使用匿名函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I have a class that uses 5.3 feature anonymous function (https://github.com/JeffreyWay/Easy-WordPress-Custom-Post-Types/blob/master/jw_custom_posts.php), but there is a problem, on the server I can not upgrade to 5.3. Is there any simple workaround to get rid of anonymous functions or do I need to rewrite whole class?
推荐答案
您有两个选择:
- 使用支持匿名功能的PHP版本更改托管
- 重新编写代码,使其可与您拥有的PHP版本一起使用
这篇关于在PHP 5.3之前如何使用匿名函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文