note 95370 added to function.abs

From: Date: Tue, 29 Dec 2009 17:34:56 +0000
Subject: note 95370 added to function.abs
Groups: php.notes 
Request: Send a blank email to php-notes+get-164442@lists.php.net to get a copy of this message
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. ---- Server IP: 89.31.146.176 Probable Submitter: 82.228.41.155 ---- Manual Page -- http://www.php.net/manual/en/function.abs.php Edit -- https://master.php.net/note/edit/95370 Del: integrated -- https://master.php.net/note/delete/95370/integrated Del: useless -- https://master.php.net/note/delete/95370/useless Del: bad code -- https://master.php.net/note/delete/95370/bad+code Del: spam -- https://master.php.net/note/delete/95370/spam Del: non-english -- https://master.php.net/note/delete/95370/non-english Del: in docs -- https://master.php.net/note/delete/95370/in+docs Del: other reasons-- https://master.php.net/note/delete/95370 Reject -- https://master.php.net/note/reject/95370 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#164442) next »