问题
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