Doc #60072 [NEW]: eval parameter must not begin with <?php

From: Date: Sun, 16 Oct 2011 20:28:46 +0000
Subject: Doc #60072 [NEW]: eval parameter must not begin with <?php
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7329@lists.php.net to get a copy of this message
From: Operating system: Debian Squeeze PHP version: 5.3.8 Package: Documentation problem Bug Type: Documentation Problem Bug description:eval parameter must not begin with <?php Description: ------------ --- From manual page: http://www.php.net/function.eval#refsect1-function.eval- parameters --- The eval documentation says: "The code string to be evaluated. code_str does not have to contain PHP Opening tags." But the code string must not contain PHP Opening tags unless after a PHP Closing tag. Test script: --------------- <?php eval('<?php echo "hallo\n"; ?>'); ?> Expected result: ---------------- hallo Actual result: -------------- PHP Parse error: syntax error, unexpected '<' in /tmp/php/test.php(3) : eval()'d code on line 1 -- Edit bug report at https://bugs.php.net/bug.php?id=60072&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60072&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60072&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60072&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60072&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60072&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60072&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60072&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60072&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60072&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60072&r=support Expected behavior: https://bugs.php.net/fix.php?id=60072&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60072&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60072&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60072&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60072&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60072&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60072&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60072&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60072&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60072&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60072&r=mysqlcfg

« previous php.doc.bugs (#7329) next »