<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.gmp.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.gmp-lcm.php',
    1 => 'gmp_lcm',
    2 => 'Calculate LCM',
  ),
  'up' => 
  array (
    0 => 'ref.gmp.php',
    1 => 'GMP Functions',
  ),
  'prev' => 
  array (
    0 => 'function.gmp-kronecker.php',
    1 => 'gmp_kronecker',
  ),
  'next' => 
  array (
    0 => 'function.gmp-legendre.php',
    1 => 'gmp_legendre',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/gmp/functions/gmp-lcm.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.gmp-lcm" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gmp_lcm</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.3.0, PHP 8)</p><p class="refpurpose"><span class="refname">gmp_lcm</span> &mdash; <span class="dc-title">Calculate LCM</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.gmp-lcm-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>gmp_lcm</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="class.gmp.php" class="type GMP">GMP</a></span>|<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">$num1</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="class.gmp.php" class="type GMP">GMP</a></span>|<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">$num2</code></span>): <span class="type"><a href="class.gmp.php" class="type GMP">GMP</a></span></div>

  <p class="para rdfs-comment">
   This function computes the least common multiple (lcm) of
   <code class="parameter">num1</code> and <code class="parameter">num2</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.gmp-lcm-parameters">
  <h3 class="title">Parameters</h3>
  <dl>
   
    <dt><code class="parameter">num1</code></dt>
    <dd>
     <p class="para">
 A <span class="classname"><a href="class.gmp.php" class="classname">GMP</a></span> object, an <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>,
 or a <span class="type"><a href="language.types.string.php" class="type string">string</a></span> that can be interpreted as a number following the same logic
 as if the string was used in <span class="function"><a href="function.gmp-init.php" class="function">gmp_init()</a></span> with automatic
 base detection (i.e. when <code class="parameter">base</code> is equal to 0).
</p>
    </dd>
   
   
    <dt><code class="parameter">num2</code></dt>
    <dd>
     <p class="para">
 A <span class="classname"><a href="class.gmp.php" class="classname">GMP</a></span> object, an <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>,
 or a <span class="type"><a href="language.types.string.php" class="type string">string</a></span> that can be interpreted as a number following the same logic
 as if the string was used in <span class="function"><a href="function.gmp-init.php" class="function">gmp_init()</a></span> with automatic
 base detection (i.e. when <code class="parameter">base</code> is equal to 0).
</p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.gmp-lcm-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   A <span class="classname"><a href="class.gmp.php" class="classname">GMP</a></span> object.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.gmp-lcm-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.gmp-gcd.php" class="function" rel="rdfs-seeAlso">gmp_gcd()</a> - Calculate GCD</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>