By qube on
Hi,
I checkout Drupal HEAD from CVS, but php files do not ends with ?>. Is it required behavior? Can anyone explain me why it is like this and what I can do to correct php files?
Thanks.
Hi,
I checkout Drupal HEAD from CVS, but php files do not ends with ?>. Is it required behavior? Can anyone explain me why it is like this and what I can do to correct php files?
Thanks.
Comments
It is intentional
Why do you want to 'correct' it?
--------------------- WEBg8 ---------------------
Beacouse I can't execute
Beacouse I can't execute such php files in webserver.
qube, I fought direly
qube, I fought direly against this change, but its intentional, though undocumented (for Drupal, at least). For Drupal, it's supposed to fix a bug related to whitespace AFTER the ?>, which can cause syntax errors and breakage via require() or include(). Could you give us more information on why you can't run without this? Any dirt I can use to get this patch reverted, I'm happy about.
http://disobey.com/
http://gamegrene.com/
http://www.disobey.com/
Omitting ?> is a great idea
Sorry, but I'm all for omitting the closing ?> tag. Having invisible whitespace at the end of a file being significant is a natural source of errors. PHP does not require the closing tag, and in fact the PHP docs specifically recommend omitting it to avoid errors:
http://www.php.net/manual/en/language.basic-syntax.instruction-separatio...
Geary: suffice it to say,
Geary: suffice it to say, I'm keeping my mouth shut. I've argued this on the list already enough, and I don't want to repeat myself on this node.
http://disobey.com/
http://gamegrene.com/
http://www.disobey.com/
Sorry, didn't mean to be argumentative :-)
Sounds like I was rehashing an old debate. Didn't mean to do that! It was just a new discovery for me. :-)
Morbus Iff: Thanks for explanation
I didn't know this. I thought, it is broken file. I will try it later.
Geary: I'm sorry, I was just
I'm sorry, I was just surprized with the fact it is missing, that I immediatelly posted new topic without actually trying it. I want to test it all later. Can you direct me to the thread where you discussed it (direly fought against it :-)? I searched forums, but found nothing relevant to this. (Maybe search is ommiting ?> string.)
I think that was Morbus...
...who was direly fighting against it. :-) No apology needed, it would probably be surprising to anyone who is used to seeing the ?> and finds it for the first time.
The bulk of the discussion
The bulk of the discussion happened on the drupal-devel mailing list, but you can see remnants of it (where I've repeated everything I'd've wanted say, really) at http://drupal.org/node/29385.
http://disobey.com/
http://gamegrene.com/
http://www.disobey.com/