class My_class
{
const STATUS_ERROR = 0;
const STATUS_OK = 1;
const DB_TABLE = TABLE_PREFIX . 'class_table';
}
Iki durum consts ince iş ve self::STATUS_ERROR ve self::STATUS_OK sadece iyi gibi sınıf yöntemleri içinde ulaşılabilir.
Sorunu ben üçüncü sabit tanımlamak çalıştığınızda aşağıdaki hata atılan durdurmak için nasıl biridir.
Parse error: syntax error, unexpected '.', expecting ',' or ';' in /home/sub/sub/directory/script.php