Why not?
It's convenient to assign an empty array to a property in this manner.

private $storage = array();

So why not 
private $storage = new ArrayObject();

Doing stuff like this in class definition vs in constructor just makes code
look cleaner.


Dmitri Snytkine
Web Developer
Ultra Logistics, Inc.
Phone: (888) 220-4640 x 2097
Fax: (888) 795-6642
E-Mail: dsnytk...@ultralogistics.com
Web: www.ultralogistics.com

"A Top 100 Logistics I.T. Provider in 2011"


-----Original Message-----
From: Stas Malyshev [mailto:smalys...@sugarcrm.com] 
Sent: Friday, April 13, 2012 8:08 PM
To: Anthony Ferrara
Cc: Dmitri Snytkine; PHP Internals
Subject: Re: [PHP-DEV] Ability to assign new object to a class property.

Hi!

> Just throwing this out there, but that code wouldn't be run on parse.
> It would be "queued" to run prior to the constructor on instantiation.

Why? You have perfectly good ctor, why not use it?
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227


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

Reply via email to