Functions should be called with no spaces between the function
name, the opening parenthesis, and the first parameter; spaces
between commas and each parameter, and no space between the last
parameter, the closing parenthesis, and the semicolon. Here's an
example:
<?php
$var = foo($bar, $baz, $quux);
?>
|
As displayed above, there should be one space on either side of an
equals sign used to assign the return value of a function to a
variable. In the case of a block of related assignments, more space
may be inserted to promote readability:
<?php
$short = foo($bar);
$long_variable = foo($baz);
?>
|
|
Control Structures (Previous)
|
(Next) Class Definitions
|
|
|
Download Documentation
|
Last updated: Sun, 01 Jul 2007 |
|
Do you think that something on this page is wrong? Please file a bug report or add a note.
|
| User Notes: |
Note by: user@example.com
In a well written code you shouldn't use find/replace. Especially a mindless find/replace. If so take your time.
Note by: aheinz@lulu.com
Adding spaces for horizonal justification improves readability until you do a search/replace on a variable name. This practice should be discouraged.
|
|