[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    [PHP-DEV] Re: Inconsistent float to string vs. string to float casting
From:       "Christoph M. Becker" <cmbecker69 () gmx ! de>
Date:       2018-12-27 18:09:59
Message-ID: bcd7855a-bf93-df71-56e2-ca0258a1e6cd () gmx ! de
[Download RAW message or body]

On 27.12.2018 at 18:57, Christoph M. Becker wrote:

> […] filter_var() with
> FILTER_VALIDATE_FLOAT can also be used, and might be the best option if
> you don't know which decimal separator is used, and you are sure there
> are no thousands separators in the string.

No, that doesn't work, since the 'decimal' separator must be one char.
I've mixed that up with the 'thousand' option available as of PHP 7.3.0.

-- 
Christoph M. Becker

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic