Re: Making stdClass iterable
| From: | Markus Fischer | Date: | Sat, 12 Jan 2019 20:21:08 +0000 |
| Subject: | Re: Making stdClass iterable | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-103720@lists.php.net to get a copy of this message | ||
On 12.01.19 21:13, Dan Ackroyd wrote:
Hi Duncan, [...] great pointsI was about to reply to Craig when Dans' email hit the list. I couldn't agree with Dan more. The expanded use of stdClass feels wrong to me, as in: wrong solution to a problem best solved differently. Dan gave ample examples about that. I think one more approach not mentioned is that you could also `(array) $yourStdClassVar`. Of course you didn't ask for it, but nevertheless: stdClass is already a weird thing on its own and I wouldn't want to see it getting more attention to increase the encourage to use it. cheers, - Markus