note 95370 deleted from function.abs by danbrown

From: Date: Tue, 29 Dec 2009 17:35:52 +0000
Subject: note 95370 deleted from function.abs by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164443@lists.php.net to get a copy of this message
Note Submitter: sviscaino123 at hotmail dot fr ---- To Berenoguz at superonline dot com: Making this kind of check is useless, as -$y will always return the turned value. So you may use this instead : <?php function turn($x) { return -$x; } echo turn(-5) + turn(10); ?> Which will output the same result faster.

« previous php.notes (#164443) next »