Doc #55376 [Opn->Bgs]: Type casting and type juggling are notsame 0x
| From: | bjori@php.net | Date: | Wed, 17 Aug 2011 11:04:13 +0000 |
| Subject: | Doc #55376 [Opn->Bgs]: Type casting and type juggling are notsame 0x | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7022@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55376&edit=1
ID: 55376
Updated by: bjori@php.net
Reported by: riad93 at mail dot ru
Summary: Type casting and type juggling are notsame 0x
-Status: Open
+Status: Bogus
Type: Documentation Problem
Package: Documentation problem
Operating System: Ubuntu 11.04
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
You are casting a string starting with 0 to an integer and then multiply it.
Previous Comments:
------------------------------------------------------------------------
[2011-08-06 15:10:51] riad93 at mail dot ru
Description:
------------
I try to cast hex string with 0x to int I get 0 but
juggling returns not null value. Why?
Documentation of type casting and type juggling refers to
http://www.php.net/manual/en/language.types.string.php#language.types.string.conv
ersion
Test script:
---------------
var_dump('0xD' * 1 );
var_dump((int)'0xD' * 1);
Expected result:
----------------
Same results. 0 or 13. I think, 0
Actual result:
--------------
int(13)
int(0)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55376&edit=1