note 55282 deleted from function.eval by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 14:53:33 +0000 |
| Subject: | note 55282 deleted from function.eval by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197202@lists.php.net to get a copy of this message | ||
Note Submitter: privat at timo-damm dot de
----
Using the html_eval() some notes above I experienced problems related to *dirty* html. This function
is less critical:
<?php
function html_eval2($string) {
return preg_replace_callback("/<\?php(.*?)\?>/","my_eval",$string);
}
function my_eval($arr) {
return eval($arr[1]);
}
?>
Timo