PHP sabiti() İşlev
Örnek
Bir sabitin değerini döndür:
<?php
//define a constant
define("GREETING","Hello you! How are you today?");
echo constant("GREETING");
?>
Tanım ve Kullanım
sabit() işlevi, bir sabitin değerini döndürür.
Not: Bu işlev ayrıca sınıf sabitleriyle de çalışır.
Sözdizimi
constant(constant)
Parametre Değerleri
Parameter | Description |
---|---|
constant | Required. Specifies the name of the constant to check |
Teknik detaylar
Geri dönüş değeri: | Bir sabitin değerini veya sabit tanımlanmamışsa NULL döndürür |
---|---|
PHP Sürümü: | 4+ |
❮ PHP Çeşitli Referans