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)