Advantages of declared vs undeclared object properties

From: Date: Sun, 25 May 2008 07:51:08 +0000
Subject: Advantages of declared vs undeclared object properties
Groups: php.general 
Request: Send a blank email to php-general+get-274672@lists.php.net to get a copy of this message
In a setup like you've got with a SimpleXML object, where object properties aren't necessarily declared in the class definition but are added on an ad hoc basis, is there any performance hit? If not, other than the ability to mark properties as private, is there any other particular advantage to declaring them at the top of the class definition? Thanks, Weston

« previous php.general (#274672) next »