Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10535 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44306 invoked by uid 1010); 16 Jun 2004 18:02:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 44235 invoked from network); 16 Jun 2004 18:02:56 -0000 Received: from unknown (HELO miranda.org) (209.58.150.153) by pb1.pair.com with SMTP; 16 Jun 2004 18:02:56 -0000 Received: (qmail 25832 invoked by uid 546); 16 Jun 2004 18:02:55 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 16 Jun 2004 18:02:55 -0000 Date: Wed, 16 Jun 2004 14:02:55 -0400 (EDT) X-X-Sender: adam@miranda.org To: hartmut@php-groupies.de cc: Alexander Valyalkin , internals@lists.php.net In-Reply-To: <40D07FB6.6030905@php.net> Message-ID: References: <40D07FB6.6030905@php.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] strrchr() bugs From: adam@trachtenberg.com (Adam Maccabee Trachtenberg) On Wed, 16 Jun 2004, Hartmut Holzgraefe wrote: > > 1) strrpos('abcd', '') returns 4. Expected FALSE > Although one could argue whether searching for empty > strings makes sense at all the result is not completely > wrong. There *is* an empty string at the end of the haystack ... And at the beginning of the haystack and also in between each and every letter. :) Logically, it would probably be best to return 0 because that's where the first empty string occurs. > So for BC reasons this behavior should not be changed. Agreed. We shouldn't mess with this function. -adam -- adam@trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today!