On Tue, 13 Apr 2010, Felix De Vliegher wrote:

> >>>> Update: http://phpbenelux.eu/array_seek-return.patch.txt
> >>>> I've kept the fseek()-style return values (0 when fine, -1 when seek 
> >>>> fails)
> >>> 
> >>> Any reason why you picked that over the (IMO more logical) true/false 
> >>> approach?
> >> 
> >> No, it makes more sense to use the boolean return values, I was just 
> >> using your fseek() analogy. Although I still find it useful to return 
> >> the seeked value, and false when seek fails (basically how next(), 
> >> reset() and friends behave).
> > 
> > Has this been added to trunk now? Or not yet?
> 
> No, still have it lying around. Can I commit this?

Dunno... did you go with true/false in the end, or returning the value? 
I just realize that in the latter case you wouldn't be able to see 
whether the seek actually worked, because every value could be a 
"correct" value. I'd prefer the true/false thing still because of that.

Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to