PHP enddeclare 키워드
예시
선언 블록을 닫습니다.
<?php
$count = 0;
function example() {
global $count;
$count++;
echo "$count instructions executed<br>";
}
register_tick_function('example');
declare(ticks=1):
$cars =
["Ford", "Volvo", "BMW"];
foreach($cars as $car) {
echo "$car <br>";
}
enddeclare;
?>
정의 및 사용
enddeclare
키워드는 구문을 사용하여 시작된 블록을 닫는 데 사용 됩니다 declare
.
declare(...):
관련 페이지
선언 키워드입니다 .
❮ PHP 키워드