On Sun, Jul 3, 2016 at 9:50 AM, Aaron Piotrowski wrote:
>> Do you mean that this code:
>>
>> $a = json_decode('{"a": 1, "b": 2, "c": 3}');
>> foreach($a as $b) {
>>var_dump($b);
>> }
>>
>> will no longer work, or that it will still work, but stdClass would not
>> be instanceof Iterable?
>
> Th
Hi Stas,
> On Jul 2, 2016, at 7:00 PM, Stanislav Malyshev wrote:
>
> Do you mean that this code:
>
> $a = json_decode('{"a": 1, "b": 2, "c": 3}');
> foreach($a as $b) {
>var_dump($b);
> }
>
> will no longer work, or that it will still work, but stdClass would not
> be instanceof Iterable?
Hi!
> Generally when I've seen an object that did not implement Traversable
> used with foreach it has been an error. The exception of course is
> stdClass, particularly because of json_decode(). There was no
> discussion on the list of allowing stdClass, but I did discuss it
> with some people in
On Saturday, July 2, 2016, Aaron Piotrowski wrote:
>
>
>
There was no discussion on the list of allowing stdClass, but I did discuss
> it with some people in chat. Our consensus was that a casting to an array
> was a reasonable and simple requirement to allow an instance of stdClass to
> be iterab
Hi Jeremy,
> On Jun 30, 2016, at 3:01 PM, Jeremy Mikola wrote:
>
> Was there any discussion about a special allowance being made for stdClass?
>
> I've noted the is_iterable(new stdClass) example and ensuing "Object
> Iteration" section:
>
> PHP allows any object to be used with foreach. Howe
On Thu, Jun 30, 2016 at 10:01 PM, Jeremy Mikola wrote:
> On Sat, Jun 18, 2016 at 11:34 AM, Aaron Piotrowski
> wrote:
>
> >
> > I plan on bringing the iterable RFC (https://wiki.php.net/rfc/iterable)
> > to a vote in about a week, does anyone have any further feedback on this
> > proposal?
> >
>
On Sat, Jun 18, 2016 at 11:34 AM, Aaron Piotrowski
wrote:
>
> I plan on bringing the iterable RFC (https://wiki.php.net/rfc/iterable)
> to a vote in about a week, does anyone have any further feedback on this
> proposal?
>
Was there any discussion about a special allowance being made for stdClas
: Dan Ackroyd
Cc: internals@lists.php.net; Dmitry Stogov
Subject: Re: [PHP-DEV] [RFC] Iterable
> On Jun 18, 2016, at 6:11 PM, Dan Ackroyd wrote:
>
> Hi Aaron,
>
>> does anyone have any further feedback on this proposal?
>
> What is the performance impact of the RFC on the st
> On Jun 18, 2016, at 6:11 PM, Dan Ackroyd wrote:
>
> Hi Aaron,
>
>> does anyone have any further feedback on this proposal?
>
> What is the performance impact of the RFC on the standard performance
> benchmarks?
>
> And can you comment on the performance of using iterable as a type for
> par
Hi Aaron,
> does anyone have any further feedback on this proposal?
What is the performance impact of the RFC on the standard performance
benchmarks?
And can you comment on the performance of using iterable as a type for
parameters/return types, compared to normal classes?
cheers
Dan
--
PHP I
Hi all,
I plan on bringing the iterable RFC (https://wiki.php.net/rfc/iterable) to a
vote in about a week, does anyone have any further feedback on this proposal?
Thanks!
Aaron Piotrowski
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
I would like to propose a new iterable pseudo-type that accepts both arrays and
objects implementing Traversable. Values accepted by iterable can then be used
with foreach and yield from, or help to reduce type-checking logic in general.
Please review the RFC here: https://wiki.php.net/r
12 matches
Mail list logo