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
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: legoduke at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 11:01:32 2025 UTC