#46860 [Opn->Csd]: invalid code is being executed

From: Date: Mon, 15 Dec 2008 13:43:09 +0000
Subject: #46860 [Opn->Csd]: invalid code is being executed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131991@lists.php.net to get a copy of this message
ID: 46860 Updated by: bjori@php.net 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: 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 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

« previous php.bugs (#131991) next »