Arquivos
hhvm/hphp/test/vm/continue.php
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08: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();