php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #10633 settype(.., "double") not work as expected(or documented)
Submitted: 2001-05-03 10:13 UTC Modified: 2001-05-19 12:51 UTC
From: tf at tfromm dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.0.4 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tf at tfromm dot com
New email:
PHP Version: OS:

 

 [2001-05-03 10:13 UTC] tf at tfromm dot com
$tmp = "1111111t11t";
settype($tmp, "double");
echo $tmp;

returns '1111111' imho it should be 0 ??
(alike settype(... "integer"))

using with 'double' the string is cuttet at the fist 
non-number-character 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-19 12:51 UTC] jeroen@php.net
Correct behaviour. Documentation could be better indeed. I'm working on it.

http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC