I know that I can use this to iterate on an object:
foreach ($this as $key => $value) {
print "$key => $value\n";
}
Is the order in which the properties are looked over always the same or is it random?
I tried it a bit and it seems to always follow the declaration order, as in the exemple from here: http://php.net/manual/en/language.oop5.iterations.php
But I couldn't find any documentation where this is formally specified.
Can an experimented PHP dev confirm or disconfirm what I found in my trials?