Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59925 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35319 invoked from network); 14 Apr 2012 12:03:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2012 12:03:13 -0000 Authentication-Results: pb1.pair.com header.from=dsnytkine@Ultralogistics.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dsnytkine@Ultralogistics.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain Ultralogistics.com from 64.197.110.172 cause and error) X-PHP-List-Original-Sender: dsnytkine@Ultralogistics.com X-Host-Fingerprint: 64.197.110.172 thrud.alliantinternet.com Received: from [64.197.110.172] ([64.197.110.172:58592] helo=thrud.alliantinternet.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/26-33137-F77698F4 for ; Sat, 14 Apr 2012 08:03:12 -0400 Received: by thrud.alliantinternet.com (Postfix, from userid 1001) id 855C2174325; Sat, 14 Apr 2012 08:03:09 -0400 (EDT) To: "'Stas Malyshev'" , "'Anthony Ferrara'" Cc: "'PHP Internals'" References: <01ed01cd19aa$58810e80$09832b80$@alliantinternet.com> <4F888746.4050705@sugarcrm.com> <4F88BFDB.3030004@alliantinternet.com> In-Reply-To: <4F88BFDB.3030004@alliantinternet.com> Date: Sat, 14 Apr 2012 08:03:07 -0400 Message-ID: <01fb01cd1a36$8df14d50$a9d3e7f0$@alliantinternet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Thread-Index: Ac0Z0qXa+P0zXH2zROSprpBuV57EXgAY6njQ Content-Language: en-us Subject: RE: [PHP-DEV] Ability to assign new object to a class property. From: dsnytkine@Ultralogistics.com ("Dmitri Snytkine") 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: dsnytkine@ultralogistics.com Web: www.ultralogistics.com "A Top 100 Logistics I.T. Provider in 2011" -----Original Message----- From: Stas Malyshev [mailto:smalyshev@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