On Sep 30, 2010, at 7:14 AM, Johannes Schlüter wrote: > On Thu, 2010-09-30 at 16:37 +0300, Adi Nita wrote: >> Perhaps a better idea would be to group the ones that we already have >> under a common namespace. But this is no news, though. > > Even then it would be unlikely that we add another special purpose > function. This would have to be an important feature, ringing huge > improvements in performance versus existing solutions (like preg_math)
I can see (and always wish for) in_string() existing, but that's more for naming reasons. Choosing strpos() or strstr() or some other random string function for this common task feels dirty. Imagine if we had to use arrpos() instead of in_array() ;) Also, since strpos() is our official method, we must worry about 0 == false. Sorry for hijacking this thread, but it feels related. As for between(), creating a cookbook of common tasks (and inserting them into the manual) sounds reasonable. For example, we did something like this for the plethora of array sorting functions: http://php.net/array.sorting Regards, Philip -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php