ID:               46860
 Updated by:       [email protected]
 Reported By:      atomo64 at gmail dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: GNU/Linux
 PHP Version:      5.2.8
 New Comment:

bj...@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


Previous Comments:
------------------------------------------------------------------------

[2008-12-13 17:53:39] 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)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46860&edit=1

Reply via email to