Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10558 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91677 invoked by uid 1010); 17 Jun 2004 07:29:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87584 invoked from network); 17 Jun 2004 07:28:11 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 17 Jun 2004 07:28:11 -0000 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.10/8.12.10) with ESMTP id i5H7SAxr030245; Thu, 17 Jun 2004 09:28:10 +0200 Date: Thu, 17 Jun 2004 09:28:10 +0200 (CEST) X-X-Sender: derick@localhost To: Adam Maccabee Trachtenberg cc: PHP Developers Mailing List In-Reply-To: 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: derick@php.net (Derick Rethans) On Wed, 16 Jun 2004, Adam Maccabee Trachtenberg wrote: > 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. Erm, no. It's strRpos (reverse), so it should find the one at the end first. Derick