Doc #55351 [Opn->Bgs]: 0 and 1: no floats!

From: Date: Mon, 07 Nov 2011 19:40:44 +0000
Subject: Doc #55351 [Opn->Bgs]: 0 and 1: no floats!
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7397@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55351&edit=1 ID: 55351 Updated by: kalle@php.net Reported by: valentinknabel at gmail dot com Summary: 0 and 1: no floats! -Status: Open +Status: Bogus Type: Documentation Problem Package: Website problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Please re-report this in ENGLISH (change the status back to Open) Previous Comments: ------------------------------------------------------------------------ [2011-08-27 09:46:39] valentinknabel at gmail dot com typeof(1) != typeof(1.0) :) ------------------------------------------------------------------------ [2011-08-26 19:16:55] bradley@php.net 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) ------------------------------------------------------------------------ [2011-08-02 20:52:39] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55351&edit=1

« previous php.doc.bugs (#7397) next »