php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40180 php_strip_whitespace break hexadecimal int
Submitted: 2007-01-20 09:20 UTC Modified: 2007-01-20 12:22 UTC
From: develar at gmail dot com Assigned: iliaa (profile)
Status: Closed Package: Unknown/Other Function
PHP Version: 5.2.1RC3 OS: Windows XP SP2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: develar at gmail dot com
New email:
PHP Version: OS:

 

 [2007-01-20 09:20 UTC] develar at gmail dot com
Description:
------------
php_strip_whitespace produce invalid code

Reproduce code:
---------------
// test.php
<?php

echo php_strip_whitespace('stripme.php')

?>

// stripme.php
<?php

$foo = 0x9E3779B9;

?>

Expected result:
----------------
<?php
 $foo = 0x9E3779B9; ?>

Actual result:
--------------
<?php
 $foo = 9E3779B9; ?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-20 12:05 UTC] php_lists at realplain dot com
No, actually that fixed it. :-) The previous code was from a patch of mine, and it was modifying yytext (following HEAD's lead! I had since discovered another bug where changing yytext was causing characters to be dropped, which was fixed). Then I realized this hex bug existed too, and Ilia applied my fix before releasing RC3.

The "Reproduce code" posted works as expected in RC3, so the reporter was not using RC3 as indicated. Only RC2 had this problem.
 [2007-01-20 12:22 UTC] develar at gmail dot com
I use 5.2.1RC3-dev. I install last snapshot and now use 5.2.1RC4-dev. Bug fixed. Thanks.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 19:01:28 2025 UTC