|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-15 22:52 UTC] tony2001@php.net
[2006-11-16 01:29 UTC] dereks at x-no-archive dot co dot uk
[2006-11-16 12:37 UTC] mgf@php.net
[2006-11-16 12:47 UTC] dereks at x-no-archive dot co dot uk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 15:00:02 2025 UTC |
Description: ------------ This might be something I've got wrong, but in PHP5 it appears that if you use the shorthand <? to start a php script, if you have a > sign anywhere before the closing ?>, PHP escapes and starts processing the rest of the script as HTML as if ?>; has been entered. This didn't happen in 4.x, and feels like a bug rather than a feature. This is with PHP Windows NT 5.1.6 build 2600, dated Aug 23 2006 16:31:18. I would have upgraded in order to retest, but am unable to due to client's requirements. Reproduce code: --------------- <? /* * test break out of php with greater than sign * */ function somefunction($x) { if ($x > 100) { do_something(); } } ?> Expected result: ---------------- Running this script on it's own should produce no output. Actual result: -------------- Actual output is: 100) { do_something(); } } ?>