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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: aids at ukr dot net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Mon Nov 25 08:01:32 2024 UTC