Question About Code Being Flush

The 2.0.x discussion forum has been locked; this will remain read-only. The 3.0.x discussion forum has been renamed phpBB Discussion.
Locked
Torey
Registered User
Posts: 42
Joined: Tue Feb 19, 2008 12:20 pm

Question About Code Being Flush

Post by Torey » Fri May 02, 2008 5:09 am

Does the code for php files have to be flush? For instance, if there was a bit of code that was not flush with the rest...does this make a difference? Here is an example (just a random example)(I had to use "-" at the start because I couldn't figure out how to show you the spacing with the 'Code' function formatting it):

"L_ENABLE_GZIP" => $lang['Enable_gzip'],
-------"L_ENABLE_PRUNE" => $lang['Enable_prune'],
-------"L_ALLOW_HTML" => $lang['Allow_HTML'],
-------"L_ALLOW_BBCODE" => $lang['Allow_BBCode'],
---"L_ALLOWED_TAGS" => $lang['Allowed_tags'],
---"L_ALLOWED_TAGS_EXPLAIN" => $lang['Allowed_tags_explain'],
-------"L_ALLOW_SMILIES" => $lang['Allow_smilies'],
-------"L_SMILIES_PATH" => $lang['Smilies_path'],
-------"L_SMILIES_PATH_EXPLAIN" => $lang['Smilies_path_explain'],

If you see that the "L_ALLOWED TAGS" bit is not flush with the rest...does that matter? Do I need to make it all flush in order for it to function properly? Thank you.

User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: Question About Code Being Flush

Post by karlsemple » Fri May 02, 2008 5:13 am

Nope it makes no difference :) php ignores white space, you only try and keep the code layout consistent for readability purposes for future editing. Honestly though if in doubt use what is already there as a guide so make it flush, but like I say it will make no difference to the way the script works :)
Image

Torey
Registered User
Posts: 42
Joined: Tue Feb 19, 2008 12:20 pm

Re: Question About Code Being Flush

Post by Torey » Fri May 02, 2008 5:15 am

Awesome!! Thank you so much!!! :D

User avatar
3Di
Former Team Member
Posts: 14060
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Question About Code Being Flush

Post by 3Di » Sat May 03, 2008 11:42 pm

Torey wrote:Does the code for php files have to be flush? For instance, if there was a bit of code that was not flush with the rest...does this make a difference? Here is an example (just a random example)(I had to use "-" at the start because I couldn't figure out how to show you the spacing with the 'Code' function formatting it):

"L_ENABLE_GZIP" => $lang['Enable_gzip'],
-------"L_ENABLE_PRUNE" => $lang['Enable_prune'],
-------"L_ALLOW_HTML" => $lang['Allow_HTML'],
-------"L_ALLOW_BBCODE" => $lang['Allow_BBCode'],
---"L_ALLOWED_TAGS" => $lang['Allowed_tags'],
---"L_ALLOWED_TAGS_EXPLAIN" => $lang['Allowed_tags_explain'],
-------"L_ALLOW_SMILIES" => $lang['Allow_smilies'],
-------"L_SMILIES_PATH" => $lang['Smilies_path'],
-------"L_SMILIES_PATH_EXPLAIN" => $lang['Smilies_path_explain'],

If you see that the "L_ALLOWED TAGS" bit is not flush with the rest...does that matter? Do I need to make it all flush in order for it to function properly? Thank you.
It is just a matter of code readability, code standards... nothing else. :)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

Locked

Return to “2.0.x Discussion”