I am in search for a - preferably free - php ide with working autocompletion aka IntelliSense™. I have been working with NetBeans for a couple years, hoping the php support would become somewhat mature. But still it seems the singleton pattern is not supported.
$oDatabase = new MainDB();
$oDatabase->
autocompletes.
$oDatabase = MainDB::getInstance();
$oDatabase->
does not autocomplete.
$oDatabase = new MainDB();
$oDatabase = MainDB::getInstance();
$oDatabase->
DOES autocomplete, although $oDatabase was overwritten by the second line. BTW MainDB::getInstance() has a defined return type MainDB via phpdoc.