php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #61707 return value of sqrt() in documentation
Submitted: 2012-04-12 22:37 UTC Modified: 2012-04-13 01:19 UTC
From: legoduke at gmail dot com Assigned:
Status: Not a bug Package: Math related
PHP Version: 5.3.10 OS: Win XP
Private report: No CVE-ID: None
 [2012-04-12 22:37 UTC] legoduke at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.sqrt#refsect1-function.sqrt-returnvalues
---


Why didn't you say that sqrt() always return float, even if argument is, for example 4, 9, 16


Test script:
---------------
if (is_int(sqrt(9))) {
  echo 'true';
} else {
  echo 'false';
}



Expected result:
----------------
Expected value: true :)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-12 22:40 UTC] legoduke at gmail dot com
delete it pls
 [2012-04-12 22:40 UTC] legoduke at gmail dot com
-Status: Open +Status: Closed
 [2012-04-13 01:19 UTC] aharvey@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 11:01:33 2024 UTC