#22545 [NEW]: Failed to parse ending escape sequence char (\)
| From: | neo_in_matrix at msn dot com | Date: | Wed, 05 Mar 2003 06:04:58 +0000 |
| Subject: | #22545 [NEW]: Failed to parse ending escape sequence char (\) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-34844@lists.php.net to get a copy of this message | ||
From: neo_in_matrix at msn dot com
Operating system: Windows 2000/SP3/Hotfixes
PHP version: 4.3.1
PHP Bug Type: Scripting Engine problem
Bug description: Failed to parse ending escape sequence char (\)
I'm a newbie on PHP, so what I describe here may NOT be a bug.
I understand that any character between a paif of single quotes does not
get 'escaped'.
So I thought the follow small program will print
abc\
to the output screen (I'm using the so-named php-cli).
<?
$s = 'abc\';
print $s;
?>
Yet, I get the following message:
Parse error: parse error, unexpected $end in X:\dir\tes
t.php on line 6
But the following code runs just fine. It prints out
abc\088
That's exactly what I mean to do.
<?
$s = 'abc\088';
print $s;
?>
So my conclusion is that the engine has a little problem dealing with
ending \ in a single-quoted string.
--
Edit bug report at http://bugs.php.net/?id=22545&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22545&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22545&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22545&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22545&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22545&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22545&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22545&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22545&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22545&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22545&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22545&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22545&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22545&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22545&r=gnused