note 101103 added to function.eval

From: Date: Fri, 26 Nov 2010 09:18:20 +0000
Subject: note 101103 added to function.eval
Groups: php.notes 
Request: Send a blank email to php-notes+get-174372@lists.php.net to get a copy of this message
When using the eval() function like eval('?>' . $data['content'] . '<?'); Please be sure to check that the short_open_tag is on in php.ini. Otherwise it will append the opening tag to the string. If you are using eval function like eval('?>' . $data['content'] . '<?php'); and you have short_open_tag on there will be parse error. So if it is required to use function like this turn off short_open_tags. Also it is advisable to put a space after <?php to avoid any accidental error. ---- Server IP: 69.147.83.197 Probable Submitter: 195.46.230.210 ---- Manual Page -- http://www.php.net/manual/en/function.eval.php Edit -- https://master.php.net/note/edit/101103 Del: integrated -- https://master.php.net/note/delete/101103/integrated Del: useless -- https://master.php.net/note/delete/101103/useless Del: bad code -- https://master.php.net/note/delete/101103/bad+code Del: spam -- https://master.php.net/note/delete/101103/spam Del: non-english -- https://master.php.net/note/delete/101103/non-english Del: in docs -- https://master.php.net/note/delete/101103/in+docs Del: other reasons-- https://master.php.net/note/delete/101103 Reject -- https://master.php.net/note/reject/101103 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#174372) next »