Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Blank lines at end of scripts
02-23-2014, 04:18 PM,
#10
RE: Blank lines at end of scripts
It is recommended to leave off the closing php tag if there is no escaped HTML in the file.

This might be recommended but to me it seems like a bit of a lazy and possibly error prone solution instead of ensuring there is no white space after the closing tag - something that PHP programmers would normally check or educate others to do (since PHP was invented).

It is a bit like HTML5 compared to XHTML - you do not have to use closing tags however I always do. Again seems lazy otherwise and somehow making it harder or lead to possible problems if we later want to check, read, or do something with or process that HTML.

So, I prefer to have a rule - end all php files with a closing tag and ensure there is no trailing white space (or fix your editor to ensure it - along with having unix line endings).

However, consistency is better than none -whatever ruling is made for the project I'll stick to it and hope we all use the same rule.

Cheers,





Reply


Messages In This Thread
Blank lines at end of scripts - by Forums - 01-24-2014, 08:53 PM
RE: Blank lines at end of scripts - by tomglare - 02-13-2014, 08:22 PM
RE: Blank lines at end of scripts - by Forums - 02-15-2014, 11:04 PM
RE: Blank lines at end of scripts - by TurboPT - 02-18-2014, 12:45 AM
RE: Blank lines at end of scripts - by tomglare - 02-18-2014, 08:11 PM
RE: Blank lines at end of scripts - by Forums - 02-18-2014, 08:36 PM
RE: Blank lines at end of scripts - by tomglare - 02-18-2014, 09:35 PM
RE: Blank lines at end of scripts - by Forums - 02-18-2014, 10:23 PM
RE: Blank lines at end of scripts - by opto - 02-19-2014, 05:28 PM
RE: Blank lines at end of scripts - by icedlava - 02-23-2014, 04:18 PM
RE: Blank lines at end of scripts - by phil - 02-26-2014, 05:51 PM
RE: Blank lines at end of scripts - by Forums - 02-26-2014, 07:03 PM
RE: Blank lines at end of scripts - by phil - 02-26-2014, 07:06 PM
RE: Blank lines at end of scripts - by Forums - 02-26-2014, 07:16 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)