<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.gmp.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'class.gmp.php',
    1 => 'GMP',
    2 => 'The GMP class',
  ),
  'up' => 
  array (
    0 => 'book.gmp.php',
    1 => 'GMP',
  ),
  'prev' => 
  array (
    0 => 'function.gmp-xor.php',
    1 => 'gmp_xor',
  ),
  'next' => 
  array (
    0 => 'gmp.construct.php',
    1 => 'GMP::__construct',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/gmp/gmp.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.gmp.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.gmp" class="reference">

 <h1 class="title">The GMP class</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.6.0, PHP 7, PHP 8)</p>
  <div class="section" id="gmp.intro">
   <h2 class="title">Introduction</h2>
   <p class="para">
    A GMP number. These objects support overloaded
    <a href="language.operators.arithmetic.php" class="link">arithmetic</a>,
    <a href="language.operators.bitwise.php" class="link">bitwise</a> and
    <a href="language.operators.comparison.php" class="link">comparison</a> operators.
   </p>
   <blockquote class="note"><p><strong class="note">Note</strong>: 
    <p class="para">
     No object-oriented interface is provided to manipulate
     <span class="classname"><strong class="classname">GMP</strong></span> objects. Please use the
     <a href="book.gmp.php" class="link">procedural GMP API</a>.
    </p>
   </p></blockquote>
  </div>

  <div class="section" id="gmp.synopsis">
   <h2 class="title">Class synopsis</h2>

   <div class="classsynopsis"><div class="classsynopsisinfo">
    
     <span class="modifier">final</span>
     <span class="modifier">class</span> <strong class="classname"><strong class="classname">GMP</strong></strong>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="gmp.construct.php" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$num</code><span class="initializer"> = 0</span></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$base</code><span class="initializer"> = 0</span></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gmp.serialize.php" class="methodname">__serialize</a></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gmp.unserialize.php" class="methodname">__unserialize</a></span>(<span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$data</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

   }</div>
  </div>

  <div class="section">
   <h2 class="title">Changelog</h2>
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.4.0</td>
       <td>
        <span class="classname"><strong class="classname">GMP</strong></span> is now marked <span class="modifier">final</span>
       </td>
      </tr>

     </tbody>
    
   </table>

  </div>
 </div>

 












<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="gmp.construct.php">GMP::__construct</a> — Create GMP number</li><li><a href="gmp.serialize.php">GMP::__serialize</a> — Serializes the GMP object</li><li><a href="gmp.unserialize.php">GMP::__unserialize</a> — Deserializes the data parameter into a GMP object</li></ul>
</div>
<?php manual_footer($setup); ?>