----- Ursprüngliche Message -----

> Von: Gustavo Lopes <glo...@nebm.ist.utl.pt>
> An: 'Patrick Schaaf' <p...@bof.de>; internals@lists.php.net; Frank Liepert 
> <frank.liep...@gmx.de>
> CC: 'Derick Rethans' <der...@php.net>; 'Martin Jansen' <mar...@divbyzero.net>
> Gesendet: 12:32 Montag, 4.Februar 2013
> Betreff: Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0
> 
> So the question is only whether "+0" or "-0" (or 
> "+0", etc.) should be accepted as integers by FILTER_VALIDATE_INT. I 
> think they should, because we also accept non-canonical inputs such as 
> "+5", i.e., we always accept a sign. It's true that 0 is neither 
> positive or negative, but I don't think "accepts a leading sign, except 
> if it's 0" is a good option. It's an unnecessary special case.

A special case still left is "±0". It is with the 'PLUS-MINUS SIGN' (U+00B1).

It's an equally incorrect sign for the number 0 as "-" or "+" is incorrect. 
Available in internet standards ISO-8859-1 and more as "\xB1"  (UTF-8 as 
"\xC2\xB1"), FILTER_VALIDATE_INT should reflect hidden dependency of input 
encoding here.

My ±0*2 cents here.

-- hakre


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to