Re: To ?> or not to ?>

From: Date: Wed, 04 Apr 2012 06:21:38 +0000
Subject: Re: To ?> or not to ?>
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-317451@lists.php.net to get a copy of this message
On 12-04-04 01:14 AM, Donovan Brooke wrote:
Robert Cummings wrote: [snip]
Could using ob_start and ob_end_flush eliminate the ambiguity of whether or not to use '?>'?
In the generally recommended case of don't use them at the end of your file... where's the ambiguity?
http://www.php.net/manual/en/function.include.php http://www.php.net/manual/en/language.basic-syntax.phpmode.php Those seem to suggest to use them... thus the ambiguity.
From an age long gone when I asked the exact same question and Big Daddy answered:
    http://marc.info/?l=php-internals&m=106896382030183&w=2
Then again a couple of years later:
    http://marc.info/?l=php-internals&m=112537775409619&w=2
And in the manual itself (see the note):
    http://ca.php.net/basic-syntax.instruction-separation
Zend Framework and Drupal are examples of large codebases that have adopted the omission as a best practice. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.

« previous php.general (#317451) next »