Hi!

On 8/14/11 11:40 AM, Rasmus Lerdorf wrote:
My main issue with changing strncmp/strncasecmp is that these are
currently exact mappings of the underlying libc functions. For people

And why should anybody care? 99% of people using PHP never used a libc function and can hardly tell libc from gcc. If we can extend this function with useful functionality, nobody cares about what libc does.

For example, I could imagine people writing code along these lines:

$len = strlen($user_data) - strlen($suffix);
if(!strncmp($user_data, $string, $len)) {
    // do something
}

Warning doesn't fix the bug - and unless you're in 0.0001% of the population that actually reads the logs daily and checks every message there it would be little to help you. We should have more useful functions, not more warnings. Warning won't make this code to work.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to