Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6031 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13377 invoked by uid 1010); 3 Dec 2003 00:28:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 13353 invoked from network); 3 Dec 2003 00:28:50 -0000 Received: from unknown (HELO stella.fastforwardnetwork.com) (209.51.153.50) by pb1.pair.com with SMTP; 3 Dec 2003 00:28:50 -0000 Received: (qmail 8043 invoked from network); 3 Dec 2003 01:31:19 -0000 Received: from p508ab217.dip.t-dialin.net (HELO hristov.com) (80.138.178.23) by d.goto.bg with SMTP; 3 Dec 2003 01:31:19 -0000 Message-ID: <3FCD2E06.6090809@hristov.com> Date: Wed, 03 Dec 2003 01:27:50 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.6b) Gecko/20031202 X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: BC broken for strrpos()/strripos() From: php@hristov.com (Andrey Hristov) Hi devs, this night i saw that the BC of strrpos()/strripos() is broken by a patch commited by pollita 7 months ago : http://cvs.php.net/diff.php/php-src/ext/standard/string.c?login=2&r1=1.370&r2=1.371&ty=u The documenation of both function states if the second parameter is an integer instead of string then its value is used as a ord of the character to be used during the search. This no more true with HEAD. A script to reproduce : HEAD : int(3) bool(false) bool(false) PHP 4.3.5-dev (cli) (built: Dec 2 2003 00:13:37) (DEBUG): int(3) int(3) int(3) What do you think? Is it ok to break the BC here or not? As you see the other change introduced with the patch is to use the whole needle string while searching, not only the first character. Comments are welcome, Andrey