Answer the question
In order to leave comments, you need to log in
Vertical indents in PHP code?
Lately I've been trying to adjust my coding style to the PEAR standard. Now one point remains unclear: what are the generally accepted recommendations (in particular, in the PEAR standard - I did not find something in the documentation) about the intervals between individual blocks? I mean vertical indents in the form of newlines. For example, I often skip an empty line after a large if block, or, for example, separate blocks with initial values assigned to variables with empty lines.
Example:
$foo = 15;
$bar = 10;
if ($foo > $bar) {
$div = $foo/$bar;
echo "Foo is $div times greater than bar.";
}
echo 'Some text.';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question