Why can\'t I do this in PHP? Where Database
is a singleton class and getInstance() returns a PDO object.
RTM ;)
See the last sentence of the first paragraph in the PHP documentation for properties http://www.php.net/manual/en/language.oop5.properties.php
This declaration may include an initialization, but this initialization must be a constant value--that is, it must be able to be evaluated at compile time and must not depend on run-time information in order to be evaluated.