(PHP 4, PHP 5, PHP 7, PHP 8)
abs — Valore assoluto
Restituisce il valore assoluto di un numero. Se l'argomento della funzione è di tipo float, il valore restituito è float, altrimenti restituisce un integer (perché float di solito ha un range di valori più grande di integer).
Example #1 Esempio di abs()
<?php
$abs = abs(-4.2); / $abs = 4.2; (double/float)
$abs2 = abs(5); / $abs2 = 5; (integer)
$abs3 = abs(-5); / $abs3 = 5; (integer)
?>
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant