cmbecke...@gmx.de ("Christoph M. Becker") wrote:
> Hi!
>
> Regarding the decimal separator (aka. decimal point), the behavior of
> casting float to string is inconsistent with casting string to float.
> [...]
I'm shocked... Lot of code here assumes (float) does the exact reverse of
(string); foru
> 2. But this test misses warning
>
>
> $q = 1;
> if ($q) {
> class C {}
> class D {}
> }
>
> class A {
> function bar(C $c) {}
> }
> class B extends A {
> function bar(D $D) {
> echo "ok\n";
> }
> }
> ?>
The code detects this as an error bu
On 27.12.2018 at 17:33, Umberto Salsi wrote:
> cmbecke...@gmx.de ("Christoph M. Becker") wrote:
>
>> Regarding the decimal separator (aka. decimal point), the behavior of
>> casting float to string is inconsistent with casting string to float.
>> [...]
>
> I'm shocked... Lot of code here assumes
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 t