News for hackers. Stuff that matters.
Re:PHP: A fractal of bad design by ge0rg on Tuesday April 10, 2012 @01:50PM (#3823439)
There is even a built-in for that:

    >>> "foo".find("a")
    -1
Re:PHP: A fractal of bad design by andreasvc on Tuesday April 10, 2012 @06:48PM (#3824892)
No there isn't. The one you cite is for strings, not lists. I've always wondered why lists shouldn't also have find, rindex or replace methods.