LemonInflux Posted August 1, 2008 Share Posted August 1, 2008 Is ?> really needed? I know in some cases, such as the Zend framework, you're encouraged not to use a ?> to prevent white space accidentally being placed. Just something I was wondering about, would be really pleased to have a definite answer. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/117745-solved-gt/ Share on other sites More sharing options...
The Little Guy Posted August 1, 2008 Share Posted August 1, 2008 No and Yes. You could do this: <% and %> OR <%php and %> OR <script type="php"> and </script> Basically you always need the closing tag. Quote Link to comment https://forums.phpfreaks.com/topic/117745-solved-gt/#findComment-605626 Share on other sites More sharing options...
GingerRobot Posted August 1, 2008 Share Posted August 1, 2008 Indeed. The coding standards in the Zend Framework say that, for files containing only PHP, you should not use a closing tag. At the end of the day, unless you're coding to a particular standard, it's personal preference. Quote Link to comment https://forums.phpfreaks.com/topic/117745-solved-gt/#findComment-605627 Share on other sites More sharing options...
LemonInflux Posted August 1, 2008 Author Share Posted August 1, 2008 So it's not strictly necessary? Cool beans. Topic solved? Quote Link to comment https://forums.phpfreaks.com/topic/117745-solved-gt/#findComment-605629 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.