I saw a lot of recently formatted code:
Answer:
if ($var=='test'){
$var=Foo('blah'.$var1);
}else{
// do something
}
Personally, I don't like this, and I would prefer:
B:
if ($var == 'test') {
$var = Foo('blah' . $var1);
} else {
// do something
}
I think this is much readable (pay attention to adding spaces).
Are there common preferences in the community, or is one better than the other?
source
share