protected/private function __construct() not allowed in 5.0.4?
| From: | Greg Beaver | Date: | Wed, 20 Apr 2005 03:11:46 +0000 |
| Subject: | protected/private function __construct() not allowed in 5.0.4? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-16040@lists.php.net to get a copy of this message | ||
Hi all,
I just spent quite a while searching the archives, and can't find any explanation of why this code worked in 5.0.3 but doesn't in 5.0.4:
<?php
class blah {
protected function __construct(){}
}
?>
Could someone please enlighten me? I was using this for a singleton pattern, and so it would be nice to know why it is so critical for the engine to be anal retentive here. It seems to me that it should be up to the programmer to decide how easily the object can be instantiated, unless there is a deeper engine stability issue.
Thanks,
Greg