PHP Version Upgrade Caused Problems With Class Constructors

╄→尐↘猪︶ㄣ 提交于 2019-12-13 16:06:38

问题


I just upgraded my PHP version from v5.3.1 to v5.3.9. Suddenly class constructors started not working. Any ideas?


回答1:


You are probably using constructors with Class name instead of __construct() keyword. See the behaviour change in v5.3.3 here:

http://www.php.net/archive/2010.php#id2010-07-22-2

Use __construct() and you should be fine.

http://www.php.net/manual/en/language.oop5.decon.php



来源:https://stackoverflow.com/questions/9094910/php-version-upgrade-caused-problems-with-class-constructors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!