Re: [VOTE]strn(case)cmp supporting a negative length as its third paramter

From: Date: Sun, 14 Aug 2011 18:26:22 +0000
Subject: Re: [VOTE]strn(case)cmp supporting a negative length as its third paramter
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi!

Maybe, but I would classify *that* as a bug as it makes no sense at all.
Thinking more about it, something like: if(strncasecmp($filename, ".php", -4) === 0) { /* got php file! */ } seems to me just fine and better than doing the same with substr. I would definitely be against the warning in this case. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

Thread (33 messages)

« previous php.internals (#54589) next »