PHP can't add hex numbers
| Bug #61095 | PHP can't add hex numbers | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2012-02-15 15:32 UTC | Modified: | 2012-02-24 02:34 UTC |
|
||||||||||
| From: | tomek at przeslij dot pl | Assigned: | colder (profile) | |||||||||||
| Status: | Closed | Package: | Scripting Engine problem | |||||||||||
| PHP Version: | 5.3.10 | OS: | Windows XP | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2012-02-15 15:32 UTC] tomek at przeslij dot pl
Description: ------------ These echoes 4: echo (0x00+2); echo (0x00+0x02); but they should echo 2! This echoes 2 as expected: echo (0x00 + 2); Test script: --------------- echo (0x00+2); Expected result: ---------------- 2 Actual result: -------------- 4
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2012-02-15 16:55 UTC] colder@php.net
-Status: Open +Status: Assigned -Package: Math related +Package: Scripting Engine problem -Assigned To: +Assigned To: colder
[2012-02-23 15:55 UTC] lepidosteus+phpbug at gmail dot com
Correct behavior for me in 5.3.3-7+squeeze3 $ php -r "var_dump(0x02+0x00);" int(2) $ php -r "var_dump(0x02+0);" int(2) $ php -r "var_dump('0x02'+0);" int(2)[2012-02-23 15:56 UTC] lepidosteus+phpbug at gmail dot com
[2012-02-23 20:40 UTC] balthasar dot reuter at cs dot fau dot de
[2012-02-23 21:55 UTC] jordan dot sherer at definition6 dot com
[2012-02-23 22:53 UTC] yk4ever at gmail dot com
[2012-02-24 01:16 UTC] admin at jesus dot de
[2012-02-24 02:34 UTC] colder@php.net
-Status: Assigned +Status: Closed
[2012-10-08 06:05 UTC] user585859 at rediffmail dot com
[2019-04-05 13:12 UTC] adityakin9 at gmail dot com