note 56385 added to function.eval
| From: | NickJohnson-Pixelrific at osu1 dot php dot net | Date: | Thu, 01 Sep 2005 04:43:28 +0000 |
| Subject: | note 56385 added to function.eval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94563@lists.php.net to get a copy of this message | ||
In reference to Nick's functions below (which didnt work for me as is) and TfM's
comment, this is fixed with a simple change to the pattern used by preg_replace_callback. The
pattern should be changed from
/\?>((.|\n)*?)<\?/
to
/\?>((.|\n)*?)<\?(php)?/
Making that small change will remove a "php" that is leftover in the string to be evaled,
which eval trips on and complains about.
----
Manual Page -- http://www.php.net/manual/en/function.eval.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56385
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56385&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56385&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56385&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56385&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56385&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56385&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56385&report=yes
Search -- http://master.php.net/manage/user-notes.php