The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<?php
if ($something) {
}
foreach ($this as $that) {
}
while (true) {
    for ($i = 0; $i < 10; $i++) {
    }
    if ($something) {
    }

    foreach ($this as $that) {
        do {
        } while (true);

    }
}

if ($one) {
} else ($two) {
} else if ($three) {
} elseif ($four) {
}
if ($one) {
} else ($two) {
} else if ($three) {
} elseif ($four) {
}
?>
<table>
    <tr>
        <td align="center" valign="center">
        <?php
        foreach ($this->children as $child) {
            // There should be no error after this
            // foreach, because it is followed by a
            // close PHP tag.
        }
        ?>
        </td>
    </tr>
</table>
<?php

switch ($blah) {
    case 'one':
        if ($blah) {
            // There are no spaces before break.
        }
    break;

    default:
        if ($blah) {
            // There are no spaces before break.
        }
    break;
}

switch ($blah) {
    case 'one':
        if ($blah) {
            // There are no spaces before break.
        }
    break;

    default:
        if ($blah) {
            // Code here.
        }
}

foreach ($blah as $var) {
    if ($blah) {
    }
    break;
}

while (true) {
    for ($i = 0; $i < 10; $i++) {

        if ($something) {
        }

    }

    foreach ($this as $that) {
        do {

            echo $i;
        } while (true);
    }
}

function myFunction()
{
    if ($blah) {
    }

}//end myFunction()

foreach ($this->children as $child) {
    echo $child;

}

if ($defaultPageDesign === 0
    && $defaultCascade === TRUE
    && $defaultChildDesign === 0
) {
    $settingsUpdated = FALSE;
}

foreach ( $blah as $var ) {
    if (  $blah    ) {
    }
}

if (
    $defaultPageDesign === 0
    && $defaultCascade === TRUE
    && $defaultChildDesign === 0
) {
    $settingsUpdated = FALSE;
}

$moo = 'blar';
switch ($moo)
{
    case 'blar':
        if ($moo === 'blar2') {
            $moo = 'blar'
        }
    return $moo;

    default:
        $moo = 'moo';
    break;
}

if ($one) {
}
elseif ($two) {
}
// else if something
else if ($three) {
} // else do something
else {
}

if ($one) {

}

do {
    echo 'hi';
} while (  $blah  );

if ($one) {
}
// No blank line here.
if ($two) {
}

switch ($moo)
{
    case 'blar':
        if ($moo === 'blar2') {
            $moo = 'blar'
        }

    return $moo;
}