php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13727 Call to undefined function: floatval()
Submitted: 2001-10-18 04:09 UTC Modified: 2001-10-18 06:01 UTC
From: aids at ukr dot net Assigned:
Status: Not a bug Package: *Math Functions
PHP Version: 4.0.6 OS: Windows 2000
Private report: No CVE-ID: None
 [2001-10-18 04:09 UTC] aids at ukr dot net
source code:
<?php

$fl = pi();
echo $fl, '<br>';
$fl = floatval($fl);
echo $fl, '<br>';

?>

return to browser:
3.1415926535898

Fatal error: Call to undefined function: floatval() in c:\temp\pit4.phtml on line 5

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-18 04:16 UTC] rasmus@php.net
As the docs at php.net/floatval state right at the top.  This function is only in CVS.  Just use $fl = (float)$foo;
 [2001-10-18 06:01 UTC] hholzgra@php.net
floatval is a new function available in current
CVS only, the old (and still available) name
is doubleval()

see the manual

http://php.net/floatval

or the function tables

http://zugeschaut-und-mitgebaut.de/php/function.floatval.html

for version and availability information
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 11:01:29 2024 UTC