singleton - trying to initialise a static property on creation fails
问题 I have a singleton class used to initialise error_handling. The class as is takes a Zend_Config object and optional $appMode in parameter, to allow overriding the defined APPMODE constant when testing this class. All is fine if I create the object with non-static properties, but initialising a static property does not work the way I expected when calling the usual getInstance(). class ErrorHandling{ private static $instance; private static $_appMode; // not initialised in returned instance