2016-11-25 19:27 GMT+01:00 Stanislav Malyshev :
>
> Now the RFC says " if the given key is present in the array the method
> would successfully return null". While technically in PHP not returning
> value and returning NULL is the same thing, I'd just omit the whole
> return thing altogether to re
Hi!
> Hello PHPeeps, I've updated the RFC! Have a look at it, please! (Sorry for
> the engrish)
Now the RFC says " if the given key is present in the array the method
would successfully return null". While technically in PHP not returning
value and returning NULL is the same thing, I'd just omit
Hello PHPeeps, I've updated the RFC! Have a look at it, please! (Sorry for
the engrish)
Wes
2016-11-23 15:29 GMT+01:00 Wes :
> I'm fine with anything as... well, being picky on this won't change the
> fact that SPL's design and exceptions are a mess :P
>
> If you are ok with that, I'm modifying
I'm fine with anything as... well, being picky on this won't change the
fact that SPL's design and exceptions are a mess :P
If you are ok with that, I'm modifying soon the RFC, so that seekKey()
would throw OutOfBoundsException instead of returning bool. Thoughts?
@Ryan I've noticed that already,
Hi,
Given that this new method seems closely related to ArrayIterator::seek, I (as
a userland developer) would very much expect it to handle error conditions in
the same way.
In the case of ArrayIterator::seek - it throws an OutOfBoundsException. I don’t
see how that isn’t appropriate for seek
I have decided to go with that because
1- I'm a fan of using Exceptions (mostly) for exceptional error conditions;
between these two
public seekKey($key):void throws WhateverException;
public seekKey($key):bool;
I (by far) prefer the latter.
2- I think it would require a new type of SPL Exception
On Tue, Nov 22, 2016 at 6:47 PM, Wes wrote:
> Greetings again PHPeople,
>
> I wanted to avoid the discussion for the small improvements I was proposing
> thinking it would be acceptable to do so (
> http://news.php.net/php.internals/97118) but apparently I was wrong (sorry
> for that), so here's