PHP localtime() လုပ်ဆောင်ချက်
ဥပမာ
အညွှန်းပြုထားသော နှင့် ပေါင်းစည်းသည့် ခင်းကျင်းတစ်ခုအဖြစ် ဒေသစံတော်ချိန်ကို ပရင့်ထုတ်ပါ-
<?php
print_r(localtime());
echo "<br><br>";
print_r(localtime(time(),true));
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
localtime() လုပ်ဆောင်ချက်သည် ဒေသစံတော်ချိန်ကို ပြန်ပေးသည်။
အထားအသို
localtime(timestamp, is_assoc)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
timestamp | Optional. Specifies a Unix timestamp that defaults to the current local time, time(), if no timestamp is specified |
is_assoc | Optional. Specifies whether to return an associative or indexed array. FALSE = the array returned is an indexed array. TRUE = the array returned is an associative array. FALSE is default.
The keys of the associative array are:
|
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | Unix အချိန်တံဆိပ်ခေါင်း၏ အစိတ်အပိုင်းများပါရှိသော အခင်းတစ်ခုကို ပြန်ပေးသည်။ |
---|---|
PHP ဗားရှင်း- | 4+ |
PHP Changelog- | PHP 5.1- ယခု E_STRICT နှင့် E_NOTICE အချိန်ဇုန်အမှားများကို ထုတ်ပေးပါသည်။ |
❮ PHP နေ့စွဲ/အချိန် အကိုးအကား