note 116868 deleted from language.operators.arithmetic by cmb

From: Date: Fri, 08 Jul 2016 00:10:54 +0000
Subject: note 116868 deleted from language.operators.arithmetic by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-205924@lists.php.net to get a copy of this message
Note Submitter: Hayley Watson ---- Not mentioned is the unary + operator, which is equivalent to adding its operand to zero. When applied to a number it has no effect, but to other types it has the effect of converting the value to an integer or double, whichever is more appropriate for the value and according to the usual type juggling rules. <?php echo gettype(+'76777.5'); // outputs "double" echo gettype(+'767775'); // outputs "integer" ?>

« previous php.notes (#205924) next »