Re: [fw-general] no php closing tag?
Or your mail clients needs a 'reply to all' option. [12.08.2007 09:41] Vinny wrote: This list really needs a reply-to header, I'd replied that I saw the light a few emails ago, but realized that it just went to one person. Sigh.
Re: [fw-general] no php closing tag?
Gmail does have that but why waste bandwidth by sending an extra message to a person's personal email address in addition to the mailing list? I guess it's a personal preference issue. On 8/15/07, Nico Edtinger [EMAIL PROTECTED] wrote: Or your mail clients needs a 'reply to all' option. [12.08.2007 09:41] Vinny wrote: This list really needs a reply-to header, I'd replied that I saw the light a few emails ago, but realized that it just went to one person. Sigh. -- Ghetto Java: http://www.streetprogrammer.com
Re: [fw-general] no php closing tag?
This list really needs a reply-to header, I'd replied that I saw the light a few emails ago, but realized that it just went to one person. Sigh. On 8/12/07, Ryan Brooks [EMAIL PROTECTED] wrote: This is actually a pretty common question. Taken straight from the Zend Coding Standards (draft) seen at: http://framework.zend.com/wiki/display/ZFDEV/PHP+Coding+Standard+(draft) For files that contain only PHP code, the closing tag (?) is to be omitted. It is not required by PHP, and omitting it prevents trailing whitespace from being accidentally injected into the output. Generally, as such, it's a good idea to omit the closing tag in PHP files containing only PHP code (such as class files). For things like views, which are mixes of PHP and HTML, close all PHP. This will prevent you from encountering trailing whitespace, which can be a bit of a headache. On Sat, 11 Aug 2007 20:58:18 -0700, Stanislav Malyshev [EMAIL PROTECTED] wrote: After going through the docs I realized that the examples with no end ? was not a typo. Is that for every php script that uses in the framework or just the framework classes? Will something bad happen if you do use '?' ? How did that design decision come about? Nothing bad happens if you use ?. However, if you use ? and after it put some whitespace, something bad does happen - this whitespace gets output, and it might be output in wrong place at the wrong time. Since closing ? is not required and anyway nothing is going to happen after ?, many people omit it. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- Ghetto Java: http://www.streetprogrammer.com
[fw-general] no php closing tag?
After going through the docs I realized that the examples with no end ? was not a typo. Is that for every php script that uses in the framework or just the framework classes? Will something bad happen if you do use '?' ? How did that design decision come about? -- Ghetto Java: http://www.streetprogrammer.com
Re: [fw-general] no php closing tag?
I think its only directed at the class files, but it's not a bad idea to leave it out of any script/class you write that have no HTML or other content. Its because if you leave it in, it's quite easy to accidentally add some white space to the end of the file, and this will then be output with your content. Generally not a problem for HTML pages, but could easily break something like binary file output. If you leave it out there is no chance of white space being output, and PHP does not require it. Vinny wrote: After going through the docs I realized that the examples with no end ? was not a typo. Is that for every php script that uses in the framework or just the framework classes? Will something bad happen if you do use '?' ? How did that design decision come about? -- Ghetto Java: http://www.streetprogrammer.com -- Jack
Re: [fw-general] no php closing tag?
If you read the coding standards document it states that any php file that only contains php in it should not have a closing tag. For us with OCD it makes it hard but after practicing it for quite some time now, you realize that it does make things super nice to not have that extra newline in an include that pushes php to send the text/html header to the browser. Vinny wrote: After going through the docs I realized that the examples with no end ? was not a typo. Is that for every php script that uses in the framework or just the framework classes? Will something bad happen if you do use '?' ? How did that design decision come about? -- Ghetto Java: http://www.streetprogrammer.com -- -- Tanguy de Courson - 0x7a69 Inc. http://www.0x7a69.net skype: myneid A job well begun is half done - Mary Poppins
Re: [fw-general] no php closing tag?
On 8/11/07, Vinny [EMAIL PROTECTED] wrote: After going through the docs I realized that the examples with no end ? was not a typo. Is that for every php script that uses in the framework or just the framework classes? Will something bad happen if you do use '?' ? How did that design decision come about? http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html -- Ghetto Java: http://www.streetprogrammer.com -- http://www.alexatnet.com/ - consulting, blog, articles and support for PHP, ZF, JavaScript and web development.
Re: [fw-general] no php closing tag?
After going through the docs I realized that the examples with no end ? was not a typo. Is that for every php script that uses in the framework or just the framework classes? Will something bad happen if you do use '?' ? How did that design decision come about? Nothing bad happens if you use ?. However, if you use ? and after it put some whitespace, something bad does happen - this whitespace gets output, and it might be output in wrong place at the wrong time. Since closing ? is not required and anyway nothing is going to happen after ?, many people omit it. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED]
Re: [fw-general] no php closing tag?
This is actually a pretty common question. Taken straight from the Zend Coding Standards (draft) seen at: http://framework.zend.com/wiki/display/ZFDEV/PHP+Coding+Standard+(draft) For files that contain only PHP code, the closing tag (?) is to be omitted. It is not required by PHP, and omitting it prevents trailing whitespace from being accidentally injected into the output. Generally, as such, it's a good idea to omit the closing tag in PHP files containing only PHP code (such as class files). For things like views, which are mixes of PHP and HTML, close all PHP. This will prevent you from encountering trailing whitespace, which can be a bit of a headache. On Sat, 11 Aug 2007 20:58:18 -0700, Stanislav Malyshev [EMAIL PROTECTED] wrote: After going through the docs I realized that the examples with no end ? was not a typo. Is that for every php script that uses in the framework or just the framework classes? Will something bad happen if you do use '?' ? How did that design decision come about? Nothing bad happens if you use ?. However, if you use ? and after it put some whitespace, something bad does happen - this whitespace gets output, and it might be output in wrong place at the wrong time. Since closing ? is not required and anyway nothing is going to happen after ?, many people omit it. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED]