Antony Dovgal wrote:

On Tue, 19 Apr 2005 23:11:46 -0400
Greg Beaver <[EMAIL PROTECTED]> wrote:



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(){}
}
?>



Works fine with HEAD, 5.0.5-dev & 5.0.4. Could you plz explain what did you mean when you said "doesn't work" ?


I didn't read the error message closely enough - when extending the base class, which has a public constructor, the protected keyword is no longer allowed.


<b>Fatal error</b>: Access level to Chiara_PEAR_Server_Frontend_Xmlrpc5_Package
::__construct() must be public (as in class Chiara_XML_RPC5_Server) in <b>c:\php
5\pear\Chiara\PEAR\Server\Frontend\Xmlrpc5.php</b> on line <b>40</b><br />


Try this code (which worked in 5.0.3)

<?php
class a { public function __construct(){}}
class b extends a { protected function __construct(){}}
?>

Greg

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to