note 98409 deleted from function.gmp-testbit by danbrown

From: Date: Mon, 14 Jun 2010 12:34:55 +0000
Subject: note 98409 deleted from function.gmp-testbit by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-170113@lists.php.net to get a copy of this message
Note Submitter: tbrendstrup ---- Disregard that last comment, i was foolish enough to think that these functions are somewhat similar in calling conventions. This actually does what the other one claimed to do, but it's not very neat :( <?php $val1 = gmp_init("0x4"); // get a copy of the value $val1b = gmp_or($val1,0); // modify the value in place... wtf? gmp_clrbit($val1b, 3); // now get the bloody value echo gmp_cmp($val1, $val1b); $val1b = gmp_or($val1,0); gmp_clrbit($val1b, 2); echo gmp_cmp($val1, $val1b); $val1b = gmp_or($val1,0); gmp_clrbit($val1b, 1); echo gmp_cmp($val1, $val1b); $val1b = gmp_or($val1,0); gmp_clrbit($val1b, 0); echo gmp_cmp($val1, $val1b); ?>

« previous php.notes (#170113) next »