Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47013 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89505 invoked from network); 21 Feb 2010 17:45:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2010 17:45:04 -0000 Received: from [127.0.0.1] ([127.0.0.1:8821]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 95/63-00376-F11718B4 for ; Sun, 21 Feb 2010 12:45:03 -0500 X-Host-Fingerprint: 200.66.16.110 unknown Received: from [200.66.16.110] ([200.66.16.110:6733] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B1/A2-00376-BEC618B4 for ; Sun, 21 Feb 2010 12:27:07 -0500 Message-ID: To: internals@lists.php.net Followup-To: php.internals Lines: 12 Date: Sun, 21 Feb 2010 11:27:14 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Posted-By: 200.66.16.110 Subject: why not use strtol instead of php_filter_parse_{int,hex,octal}? From: geissert@php.net (Raphael Geissert) Hi, While working on bug #51023, Sean and I were wondering why they were written in the first place, instead of using strtol; which can handle the three cases and properly detect overflows and underflows (and doesn't risk being optimised-away like with the current implementations). If there's no objection, I would like to remove them entirely and use strtol in php_filter_int. Cheers, -- Raphael Geissert