zend framework scripts

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
demi
Forum Newbie
Posts: 4
Joined: Fri Mar 21, 2008 6:28 am

zend framework scripts

Post by demi »

Each zend framework script begins from "<?php", but they are have not at the end "?>". Does it makes for special purpose or only for simplifying?

Thanks!
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: zend framework scripts

Post by Christopher »

Only for simplifying. When the PHP parser reached the end of the script it will close everything, so the ?> is not required. Sometimes you will have a space or newline after the ?> which will cause "headers sent" errors but it difficult to track down. So it is both not necessary and can cause a problem.
(#10850)
demi
Forum Newbie
Posts: 4
Joined: Fri Mar 21, 2008 6:28 am

Re: zend framework scripts

Post by demi »

arborint wrote:Only for simplifying. When the PHP parser reached the end of the script it will close everything, so the ?> is not required. Sometimes you will have a space or newline after the ?> which will cause "headers sent" errors but it difficult to track down. So it is both not necessary and can cause a problem.
Thank you very much!
Post Reply