Doc #55376 [NEW]: Type casting and type juggling are notsame 0x

From: Date: Sat, 06 Aug 2011 15:10:52 +0000
Subject: Doc #55376 [NEW]: Type casting and type juggling are notsame 0x
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-6983@lists.php.net to get a copy of this message
From: Operating system: Ubuntu 11.04 PHP version: 5.3.6 Package: Documentation problem Bug Type: Documentation Problem Bug description:Type casting and type juggling are notsame 0x 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 bug report at https://bugs.php.net/bug.php?id=55376&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55376&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55376&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55376&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55376&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55376&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55376&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55376&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55376&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55376&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55376&r=support Expected behavior: https://bugs.php.net/fix.php?id=55376&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55376&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55376&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55376&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55376&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55376&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55376&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55376&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55376&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55376&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55376&r=mysqlcfg

« previous php.doc.bugs (#6983) next »