array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'function.gmp-xor.php', 1 => 'gmp_xor', ), 'up' => array ( 0 => 'ref.gmp.php', 1 => 'Funções GMP', ), 'prev' => array ( 0 => 'function.gmp-testbit.php', 1 => 'gmp_testbit', ), 'next' => array ( 0 => 'class.gmp.php', 1 => 'GMP', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'pt_BR', 'path' => 'reference/gmp/functions/gmp-xor.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)
gmp_xor — Operação binária XOR
Faz a operação binária exclusiva OR (XOR) de dois números GMP.
Um objeto GMP.
Exemplo #1 Exemplo de gmp_xor()
<?php
$xor1 = gmp_init("1101101110011101", 2);
$xor2 = gmp_init("0110011001011001", 2);
$xor3 = gmp_xor($xor1, $xor2);
echo gmp_strval($xor3, 2) . "\n";
?>
O exemplo acima produzirá:
1011110111000100