<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.math.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.abs.php',
    1 => 'abs',
    2 => 'Absolutwert bzw. Betrag',
  ),
  'up' => 
  array (
    0 => 'ref.math.php',
    1 => 'Mathematische Funktionen',
  ),
  'prev' => 
  array (
    0 => 'ref.math.php',
    1 => 'Mathematische Funktionen',
  ),
  'next' => 
  array (
    0 => 'function.acos.php',
    1 => 'acos',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/math/functions/abs.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.abs" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">abs</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">abs</span> &mdash; <span class="dc-title">Absolutwert bzw. Betrag</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.abs-description">
  <h3 class="title">Beschreibung</h3>
   <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>abs</strong></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.float.php" class="type float">float</a></span></span> <code class="parameter">$num</code></span>): <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.float.php" class="type float">float</a></span></span></div>

  <p class="para rdfs-comment">
   Gibt den Betrag des Wertes <code class="parameter">num</code> ohne Vorzeichen
   zurück.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.abs-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">num</code></dt>
     <dd>
      <p class="para">
       Der zu bearbeitende Wert
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.abs-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Der Betrag des Wertes <code class="parameter">num</code>. Ist
   <code class="parameter">num</code> vom Typ <span class="type"><a href="language.types.float.php" class="type float">float</a></span>, so ist auch das
   Ergebnis von diesem Typ. Andernfalls wird das Ergebnis als <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   zurückgegeben (<span class="type"><a href="language.types.float.php" class="type float">float</a></span> hat normalerweise einen größeren
   Wertebereich als <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>).
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.abs-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">num</code> akzeptiert keine internen Objekte mehr, die
       eine numerische Konvertierung unterstützen.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.abs-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>abs()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">abs</span><span style="color: #007700">(-</span><span style="color: #0000BB">4.2</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">abs</span><span style="color: #007700">(</span><span style="color: #0000BB">5</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">abs</span><span style="color: #007700">(-</span><span style="color: #0000BB">5</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">float(4.2)
int(5)
int(5)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.abs-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.gmp-abs.php" class="function" rel="rdfs-seeAlso">gmp_abs()</a> - Absolute value</span></li>
    <li><span class="function"><a href="function.gmp-sign.php" class="function" rel="rdfs-seeAlso">gmp_sign()</a> - Sign of number</span></li>
   </ul>
  </p>
 </div>


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