Chaim Frenkel wrote: > > Removing -1 as a valid result, could be a breakage (if someone is > doing something weird with a negative result) What, like using it as an index into a substr? Bad Code is its own reward, my friend. > $foo = "flabergasted"; > substr($foo, index($foo, 'abc'), 20); # Returns undef One should never do this, regardless of what index() returns on failure. Now, if index() threw an exception on failture, you'd be o.k. But I don't think we want that... -- John Porter We're building the house of the future together.
- Re: RFC 213 (v1) rindex and index should return undef on... Nathan Wiger
- Re: RFC 213 (v1) rindex and index should return undef on... Chaim Frenkel
- Re: RFC 213 (v1) rindex and index should return und... Nathan Torkington
- Re: RFC 213 (v1) rindex and index should return... Chaim Frenkel
- Re: RFC 213 (v1) rindex and index should re... Nathan Torkington
- Re: RFC 213 (v1) rindex and index shoul... Nathan Torkington
- Re: RFC 213 (v1) rindex and index ... Chaim Frenkel
- Re: RFC 213 (v1) rindex and in... Glenn Linderman
- Re: RFC 213 (v1) rindex and in... John Porter
- Re: RFC 213 (v1) rindex and in... Glenn Linderman
- Re: RFC 213 (v1) rindex and index should return und... John Porter
- Re: RFC 213 (v1) rindex and index should return... Glenn Linderman
- Re: RFC 213 (v1) rindex and index should re... Chaim Frenkel
- Re: RFC 213 (v1) rindex and index shoul... Glenn Linderman
- Re: RFC 213 (v1) rindex and index ... Chaim Frenkel
- Re: RFC 213 (v1) rindex and in... Glenn Linderman
- Re: RFC 213 (v1) rindex and in... John Porter
- Re: RFC 213 (v1) rindex and in... Glenn Linderman
- Re: RFC 213 (v1) rindex and in... Nathan Torkington
- Re: RFC 213 (v1) rindex and index should return... Chaim Frenkel