If it was a function, parenteses would be mandatory hehe
I prefer no parentheses on include/require/echo/print/..., cant justify it with arguments though, its just the style i chose...


What about:
> if (...) {
>   ...
> }
and:
> if (...)
> {
>   ...
> }

I prefer the second, but people find good reasons for each of them...



Adam Bregenzer wrote:

On Tue, 2004-02-10 at 19:06, Richard Davey wrote:

This is slightly off-topic, but related to the include() function.
What is the given "standard" regarding when you should or shouldn't
use braces on a function.


[snip]


Both work just fine. The manual includes examples of both methods. So
which do most people consider "the right way" ?


I always use parens on function calls, I think it is more readable. Also, some syntax highlighters look for it.


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to