PHP enddeclare Mot-clé

❮ Mots-clés PHP

Exemple

Fermez un bloc declare :

<?php
$count = 0;
function example() {
global $count;
$count++;
echo "$count instructions exécutées<br>";
}
register_tick_function('example');

declare(ticks=1):
$cars = ["Ford", "Volvo", "BMW"];
foreach($cars as $car) {
echo "$car <br>";
}
enddeclare;
?>
Essayez-le vous-même »

Définition et Utilisation

Le enddeclare est un mot-clé utilisé pour fermer un declare qui a été commencé en utilisant la syntaxe declare(...): .


Pages Associées

Le declare est un mot-clé.


❮ Mots-clés PHP