|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-12-13 17:53 UTC] atomo64 at gmail dot com
Description:
------------
The following piece of code does not contain the expected ending string delimiter but is executed anyway.
Reproduce code:
---------------
<?php
preg_replace('/^(.+)$/e','var_dump(\'\\1\')\',$d)
?>
Expected result:
----------------
some sort of parsing error
Actual result:
--------------
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in fun.php on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in fun.php on line 2
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in fun.php on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in fun.php on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in fun.php on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in fun.php on line 2
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in fun.php on line 2
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in fun.php on line 2
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in fun.php on line 2
int(1)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 04:00:01 2025 UTC |
bjori@jessica:~$ /usr/src/php/5.3/sapi/cli/php <?php preg_replace('/^(.+)$/e','var_dump(\'\\1\')\',$d) ?> PHP Parse error: syntax error, unexpected $end in /home/bjori/- on line 2 Fixed in 5.3