|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-08-02 20:52 UTC] valentinknabel at gmail dot com
Description: ------------ --- From manual page: http://www.php.net/function.floatval%23R%C3%BCckgabewerte --- Rückgabewerte Der float-Wert der übergebenen Variable. Leere Arrays geben immer den Wert 0 zurück, nichtleere Arrays den Wert 1. --- Deutsch: 0 und 1 sind keine Floate sondern Integer. 0.0 und 1.0 sind Floate. English: 0 and 1 are no floats, they are integer. 0.0 and 1.0 are floats. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 05:00:01 2026 UTC |
I don't see the problem. The "0" and "1" returned by floatval are of type float: php > var_dump(floatval(array())); float(0) php > var_dump(floatval(array('foo', 'bar'))); float(1)