On Sun, 5 Jan 2003, Ilia A. wrote:

> While converting the functions inside string.c to the new parameter parsing
> API and doing some general cleanup, I've come across an interesting
> 'feature'.

    Ilia, there is a consensus that the new (slower) parameter
    parsing is only supposed to be used for new functions.  It
    makes little sense to replace faster, correct, working code
    with its worse counterpart.

> Three string functions: stristr(), strstr() and strpos() have peculiar way of
> handling non string values passed as 'needle'. Instead of converting the
> needle to a string they instead convert it to an integer and search for a
> character equivalent to that integer.
> This behavior causes a problem such as strstr("abc123", 1) returning false
> rather then returning 123 as one may expect. Because this behavior is not
> documented, I believe we could safely change it back to the behavior listed

    This should be documented then.

    - Sascha

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

Reply via email to