PHP abs() လုပ်ဆောင်ချက်
ဥပမာ
မတူညီသော ဂဏန်းများ၏ ပကတိတန်ဖိုးကို ပြန်ပေးသည်-
<?php
echo(abs(6.7) . "<br>");
echo(abs(-6.7) . "<br>");
echo(abs(-3) . "<br>");
echo(abs(3));
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
abs() လုပ်ဆောင်ချက်သည် နံပါတ်တစ်ခု၏ အကြွင်းမဲ့ (အပြုသဘော) တန်ဖိုးကို ပြန်ပေးသည်။
အထားအသို
abs(number);
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
number | Required. Specifies a number. If the number is of type float, the return type is also float, otherwise it is integer |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | နံပါတ်၏ ပကတိတန်ဖိုး |
---|---|
ပြန်ပို့အမျိုးအစား- | Float/Integer |
PHP ဗားရှင်း- | 4+ |
❮ PHP သင်္ချာအကိုးအကား