[TYPO3-dev] Re: [TYPO3-core] New TYPO3 Coding Guidelines

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Jul 7 22:59:22 CEST 2009


Marc Wöhlken wrote: on 07.07.2009 22:07:

> can any one explain why the CGLs require developers to use a closing php
> tag [1]?
> 
> Many other projects (e.g. zend framework [2]) do insist on NOT having a
> closing php tag as this may cause problems when there is whitespace at
> the end of a file as explained in the TYPO3 CGLs, too.

I only know "zend framework" proposes this non-sense and other projects
probably copy that style.

Why should that be any good?

It looks odd (opening a tag and not closing it, "this file looks
truncated"), and it can create errors if you start concatenating PHP
files together (maybe to cache them, e.g. in typo3conf/temp*.php files?).

Our CGL doesn't allow white spaces after the closing PHP tag, which
should make any other problem which is potentially fixed by this "hack"
a non-issue.

So I am also for this clean guidelines (which BTW is also what TYPO3 5
and FLOW3 CGLs say).

Cheers,
Ernesto




More information about the TYPO3-dev mailing list