Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47023 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13264 invoked from network); 22 Feb 2010 14:02:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2010 14:02:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:34856] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/D4-00376-E7E828B4 for ; Mon, 22 Feb 2010 09:02:38 -0500 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 19754DFD17; Mon, 22 Feb 2010 14:02:36 +0000 (UTC) Date: Mon, 22 Feb 2010 14:02:36 +0000 (GMT) X-X-Sender: derick@kossu.derickrethans.nl To: Pierre Joye cc: Raphael Geissert , internals@lists.php.net In-Reply-To: Message-ID: References: <7B.19.00376.96CD18B4@pb1.pair.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Re: why not use strtol instead of php_filter_parse_{int,hex,octal}? From: derick@php.net (Derick Rethans) On Mon, 22 Feb 2010, Pierre Joye wrote: > On Mon, Feb 22, 2010 at 2:21 AM, Raphael Geissert wrote: > > Raphael Geissert wrote: > >> > >> If there's no objection, I would like to remove them entirely and use > >> strtol in php_filter_int. > > > > By the way, I don't think that the fact that strtol is locale-aware should > > be a reason to make the change. Since scripts are expected to use the value > > returned by filter_var() there should be no problem with the fact that > > strings such as "100'000" are accepted as a valid integer, under certain > > locales. > > Please don't commit this change. I remember some issues with strtol > (portability, BC breaks, etc.). Please wait until we figured them out, > or find back in the archives why strtol could be a bad idea. Poratability was indeed the reason, as well as the locale issues that you mention (POSIX locales==useless). Please don't commit this. regards, Derick -- http://derickrethans.nl | http://xdebug.org twitter: @derickr