So $valueFiltered always ends up with a value like "0.3" (also in localized environments).

But now the problem is that floatval is localized itself; floatval(0.3) will give 0,3 in a german environment. Finally, stringval(floatval(0.3)) gives 0,3. And exactly this string is compared to the original $valueFiltered: