php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62676 Hexadecimal addition not working with spaces
Submitted: 2012-07-27 11:35 UTC Modified: 2013-02-18 00:35 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: heiccih at gmail dot com Assigned:
Status: No Feedback Package: Math related
PHP Version: 5.3.15 OS: Ubuntu 12.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
8 + 44 = ?
Subscribe to this entry?

 
 [2012-07-27 11:35 UTC] heiccih at gmail dot com
Description:
------------
With spaces the hexadecimal number add does not print the same result than with no spaces in the script 

Test script:
---------------
<?php
echo 0x00+0x02;
echo "\n";
echo 0x00 + 0x02;
?>

Expected result:
----------------
The following output:
2
2

Actual result:
--------------
The following output:
4
2


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-27 14:26 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2012-07-27 14:26 UTC] rasmus@php.net
Are you sure about the PHP version you reported here? This was fixed in PHP 
5.3.11 as per bug #61095
 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC