note 20813 deleted from control-structures.foreach by sniper

From: Date: Wed, 08 Oct 2003 04:09:45 +0000
Subject: note 20813 deleted from control-structures.foreach by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58011@lists.php.net to get a copy of this message
Note Submitter: ---- Just a comment about using foreach to iterate over objects: I imagine what's going on there is that when the object is thrown into the foreach it's automatically cast to type array. The casting rule (though I haven't seen it) must be to convert all property names to keys whose values are the prop values. i.e. foreach isn't really iterating over the object props, but the type-casted array.

« previous php.notes (#58011) next »