宣告

declare 用於為程式碼塊設定執行指令。

以下指令得到承認:

例如,將 ticks 設定為 1:

declare(ticks=1);

要啟用嚴格型別模式,declare 語句與 strict_types 宣告一起使用:

declare(strict_types=1);