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 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 !
Your email address:
MUST BE VALID
Solve the problem:
23 + 22 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 02:01:33 2024 UTC