Arquivos
hhvm/hphp/test/quick/continue.php
T
ptarjan 503f75d08b Rename test directories
These names don't make sense now that we run both suites the same
way.
2013-04-17 09:06:51 -07:00

43 linhas
603 B
PHP

<?php
function bare_break_continue() {
// This should emit properly; it's not an include-time fatal
break;
continue;
}
function test() {
$three = array(1, 2, 3);
$four = array(1, 2, 3, 4);
foreach ($three as $x) {
if ($x == 2) {
continue;
}
echo $x;
}
echo "\n";
foreach ($three as $x) {
foreach ($four as $y) {
if ($y == 3) {
continue $y - 1;
}
echo $y;
}
}
echo "\n";
foreach ($three as $x) {
foreach ($four as $y) {
if ($y == 3) {
continue 2;
}
echo $y;
}
}
echo "\n";
}
test();