[drupal-devel] no ?> needed at the end of modules

Gabor Hojtsy gabor at hojtsy.hu
Sun Aug 21 09:11:26 UTC 2005


>>Not that this is all all that unique, but we've found this a useful
>>tool to find the extra white space in our php files, so thought I'd
>>contribute it:
> 
> I like this approach. And I vote against the -hackish- way of simply not 
> using ?>.

It is not less hackish then using a trailing comma in an array
definition. It is a feature provided by the language, and encouraged by
the PHP Manual.

$arr = array(1, 2, 3, 4, 5,);

> I have some standard relpacement expressions that i (sometimes forget to) run 
> before I commit a file or a patch. 
> It checks for 
> * print_r, queryd ;)
> * '        ' lots of whitespace towards the end of the line
> * whitespace after ?>
> 
> Can we not run such a fix-o-matic every now and then on the core and the 
> contribs? 

How would this integrate with CPanel?

Goba



More information about the drupal-devel mailing list