Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10539 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56148 invoked by uid 1010); 16 Jun 2004 18:45:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 56115 invoked from network); 16 Jun 2004 18:45:26 -0000 Received: from unknown (HELO mailgate.mysql.com) (213.136.52.47) by pb1.pair.com with SMTP; 16 Jun 2004 18:45:26 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.mysql.com (8.12.10/8.12.10) with ESMTP id i5GIjPHo019157; Wed, 16 Jun 2004 20:45:25 +0200 Received: from mail.mysql.com ([10.222.1.99]) by localhost (mailgate.mysql.com [10.222.1.98]) (amavisd-new, port 10026) with LMTP id 16154-03; Wed, 16 Jun 2004 20:45:25 +0200 (CEST) Received: from php.net (mailsend.mysql.com [10.100.1.123]) (authenticated bits=0) by mail.mysql.com (8.12.10/8.12.10) with ESMTP id i5GIjHQ6004484; Wed, 16 Jun 2004 20:45:17 +0200 Message-ID: <40D094A8.4040506@php.net> Date: Wed, 16 Jun 2004 20:42:48 +0200 Reply-To: hartmut@php-groupies.de User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en, de MIME-Version: 1.0 To: Ard Biesheuvel CC: hartmut@php-groupies.de, Adam Maccabee Trachtenberg , Alexander Valyalkin , internals@lists.php.net References: <40D07FB6.6030905@php.net> <40D08D9D.2090703@php.net> <40D08EC8.7010007@php.net> In-Reply-To: <40D08EC8.7010007@php.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mailgate.mysql.com Subject: Re: [PHP-DEV] strrchr() bugs From: hartmut@php.net (Hartmut Holzgraefe) Ard Biesheuvel wrote: > Hartmut Holzgraefe wrote: > >> Adam Maccabee Trachtenberg wrote: >> >>> Logically, it would probably be best to return 0 because that's where >>> the first empty string occurs. >> >> this is strrchr(), not strchr() ;) >> > > Actually it's strrpos(), not str[r]chr() [look at Alexander's code], > which _has_ been rewritten in PHP 5. > It should still find the *last* emtpy string, not the first, shouldn't it? ;) -- Hartmut Holzgraefe