note 40358 deleted from language.operators.bitwise by nlopess

From: Date: Mon, 01 Mar 2004 14:16:53 +0000
Subject: note 40358 deleted from language.operators.bitwise by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-66041@lists.php.net to get a copy of this message
Note Submitter: ---- Curiously... <?php $a = ~ 1; // not 1 $b = ~ 0; // not 0 echo "not 1 equals $a"; // =-2 echo "not 0 equals $b"; // =-1 ?> You need to add 2 to $a and $b to make (not 1) = 0 and (not 0) = 1

« previous php.notes (#66041) next »