note 113483 deleted from function.abs by sobak

From: Date: Fri, 25 Nov 2016 08:57:21 +0000
Subject: note 113483 deleted from function.abs by sobak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-207690@lists.php.net to get a copy of this message
Note Submitter: alex.khimich.org ---- Few ways to convert values to negative <?php // Multiplying by "-1" $v = -1 * abs($v); // Using ternary operator $v = $v <= 0 ? $v : -$v; ?>

« previous php.notes (#207690) next »