Language Construct Spacing

Language constructs that can be used without parentheses, must have a single space between the language construct keyword and its content.

Valid: Single space after language construct.

echo<em> </em>'Hello, World!'; throw<em> </em>new<em> </em>Exception(); return<em> </em>$newLine;

Invalid: No space, more than one space or newline after language construct.

echo<em></em>'Hello, World!'; throw<em> </em>new<em> </em>Exception(); return<em></em> $newLine;
A single space must be used between the "yield" and "from" keywords for a "yield from" expression.

Valid: Single space between yield and from.

function myGenerator() { yield<em> </em>from [1, 2, 3]; }

Invalid: More than one space or newline between yield and from.

function myGenerator() { yield<em> </em>from [1, 2, 3]; yield<em></em> from [1, 2, 3]; }