#31529 [Bgs]: Can not escape Vars
| From: | david at 21stcd dot com | Date: | Fri, 14 Jan 2005 09:17:08 +0000 |
| Subject: | #31529 [Bgs]: Can not escape Vars | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-72142@lists.php.net to get a copy of this message | ||
ID: 31529
User updated by: david at 21stcd dot com
Reported By: david at 21stcd dot com
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: windows xp
PHP Version: 4.3.8
New Comment:
even so "\x".$hex
will not work either.
It was my understanding you could subsitiute vars into strings using
the previous method I outline, where as the on I just outlined add the
vars value onto the end of the string.
Previous Comments:
------------------------------------------------------------------------
[2005-01-14 04:46:53] sniper@php.net
\x$ is not valid syntax.
------------------------------------------------------------------------
[2005-01-13 10:08:58] david at 21stcd dot com
Description:
------------
The problem comes from the use of var substitution or addtion to
strings that you are trying to "escape"
I find this problem when trying to create escaped hex strings to write
data to sockets.
Reproduce code:
---------------
<?PHP
$hex = "FF";
echo "\x$hex";
?>
Expected result:
----------------
ÿ
Actual result:
--------------
\xFF
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31529&edit=1