#18858 [Opn->Csd]: conversion problems with pow() ?
| From: | edink@php.net | Date: | Sun, 11 Aug 2002 22:19:00 +0000 |
| Subject: | #18858 [Opn->Csd]: conversion problems with pow() ? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16514@lists.php.net to get a copy of this message | ||
ID: 18858
Updated by: edink@php.net
Reported By: raz0@worldonline.dk
-Status: Open
+Status: Closed
Bug Type: *Math Functions
Operating System: Windows 98 SE
PHP Version: 4.2.0
New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-08-11 12:07:19] raz0@worldonline.dk
Note: you can still cast the string to an integer like this:
<? pow((int)$_GET['size'], 2); ?>
------------------------------------------------------------------------
[2002-08-11 12:04:52] raz0@worldonline.dk
I don't know if this is a bug, but it seems that pow()
doesn't convert strings to integers like other functions.
For instance if you have the variable $_GET['size'] and
you try this...
<? pow($_GET['size'], 2); ?>
... pow() will produce an error because $_GET['size'] is
still a string (I tested var_dump($_GET['size']) and it
says it's a string).
Hope this helps in the further development of PHP :)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18858&edit=1