Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65577 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88856 invoked from network); 3 Feb 2013 18:16:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2013 18:16:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=martin@divbyzero.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=martin@divbyzero.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain divbyzero.net from 87.230.111.147 cause and error) X-PHP-List-Original-Sender: martin@divbyzero.net X-Host-Fingerprint: 87.230.111.147 mx.bauer-kirch.de Linux 2.6 Received: from [87.230.111.147] ([87.230.111.147:43049] helo=mx.bauer-kirch.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 13/00-22879-369AE015 for ; Sun, 03 Feb 2013 13:16:04 -0500 Received: by mx.bauer-kirch.de with ESMTP id 1U246i-0007Ei-Qg for ; Sun, 03 Feb 2013 19:16:00 +0100 Message-ID: <510EA95F.40503@divbyzero.net> Date: Sun, 03 Feb 2013 19:15:59 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: FILTER_VALIDATE_INT and +0/-0 From: martin@divbyzero.net (Martin Jansen) Back in December I submitted a pull request to make FILTER_VALIDATE_INT accept +0/-0. That request was merged into php-src: https://github.com/php/php-src/pull/248 The other day I then stumbled upon a note on http://www.php.net/manual/en/filter.filters.validate.php saying "Numbers +0 and -0 are not valid integers but validate as floats.", which makes me wonder if the previous behavior (rejecting +0/-0) was on purpose rather than by mistake? Or should the documentation be adjusted to reflect the new behavior? - Martin