Do you use braces?
Posted: Mon Aug 10, 2009 4:50 am
Hi
,
Not sure if this is the place for this kind of post but nevermind! Just wondering what you guys prefer in terms of the following:
Or, do you prefer to use the following:
This really isnt an important point, im just curious as to how my peers work. I personally go for the braces option 9 times out of 10. I can follow the blocks of code easier and in some IDE's it allows for highlighting to occur so I can quickly find the start and end of a block.
I think its just personal preference but im interested anyway :p
Thanks
Not sure if this is the place for this kind of post but nevermind! Just wondering what you guys prefer in terms of the following:
Code: Select all
if($something)
{
echo 'random!';
} else {
echo 'not random!';
}
Code: Select all
if($something):
echo 'random!';
else:
echo 'not random!';
endif;
I think its just personal preference but im interested anyway :p
Thanks