Re: Re: question about defining constants and pear coding standards

From: Date: Thu, 28 Sep 2006 23:35:30 +0000
Subject: Re: Re: question about defining constants and pear coding standards
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-44162@lists.php.net to get a copy of this message
On 9/24/06, Justin Patrin <papercrane@gmail.com> wrote: On 9/24/06, Terra Frost <terrafrost@gmail.com> wrote:
Justin Patrin wrote:
<snip> I disagree. For PHP4 code you should use PEAR::getStaticProperty(). $options =& PEAR::getStaticProperty('SomeObject', 'options'); $options = array('mode' => SOME_OBJECT_PHP); and for PHP5 code you should use a class static property (which can
be
overridden by an instance property or something passed into the constructor). SomeObject::$mode = SomeObject::MODE_OBJECT_PHP;
If you're suggesting I have two versions of Some_Object, how is PEAR going to know which one to install when I type "pear install
Some_Object"? No, I just don't know if you're planning on making SomeObject PHP4 compatible. If you are, use the PHP4 version. The PHP4 version will result in a ton of errors on PHP5 when the error mode
is set to E_STRICT - is this just an unavoidable consequence of PHP4-compatability? (I also apologize to Justin for the second email - I meant to send this as a reply to pear-dev@lists.php.net - not to any one individual)

« previous php.pear.dev (#44162) next »