PHP constant() လုပ်ဆောင်ချက်
ဥပမာ
ကိန်းသေတစ်ခု၏တန်ဖိုးကို ပြန်ပေးပါ-
<?php
//define a constant
define("GREETING","Hello you! How are you today?");
echo constant("GREETING");
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
constant() function သည် ကိန်းသေတစ်ခု၏တန်ဖိုးကို ပြန်ပေးသည်။
မှတ်ချက်- ဤလုပ်ဆောင်ချက်သည် အတန်းဆက်ကိန်းသေများနှင့်လည်း အလုပ်လုပ်ပါသည်။
အထားအသို
constant(constant)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
constant | Required. Specifies the name of the constant to check |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ကိန်းသေများကို သတ်မှတ်မထားပါ။ |
---|---|
PHP ဗားရှင်း- | 4+ |
❮ PHP Misc အကိုးအကား