note 103081 deleted from function.abs by danbrown
| From: | danbrown@php.net | Date: | Thu, 24 Mar 2011 15:24:23 +0000 |
| Subject: | note 103081 deleted from function.abs by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178168@lists.php.net to get a copy of this message | ||
Note Submitter: siamsnake at gmail dot com
----
<?
#set reverse:
$var=-5;
echo (int)-($var); // result: 5
$var=5;
echo (int)-($var); // result: -5
#set abs:
echo (int)-(-($var)); // always: 5
?>