常量

类

<?php

class Calendar {
    const months = 12;

    //从 8.3 起, 
    //可以指定常量的类型
    const string PHP = 'PHP 8.3';
}

$months = Calendar::months;
//months is 12

echo $months;