downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the Git repository for this website on git.php.net.

Source of: /manual/fr/function.is-float.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.var.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'fr',
  ),
 
'this' =>
  array (
   
0 => 'function.is-float.php',
   
1 => 'is_float',
  ),
 
'up' =>
  array (
   
0 => 'ref.var.php',
   
1 => 'Fonctions de gestion des variables',
  ),
 
'prev' =>
  array (
   
0 => 'function.is-double.php',
   
1 => 'is_double',
  ),
 
'next' =>
  array (
   
0 => 'function.is-int.php',
   
1 => 'is_int',
  ),
 
'alternatives' =>
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.is-float" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">is_float</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">is_float</span> &mdash; <span class="dc-title">Détermine si une variable est de type nombre décimal</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.is-float-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>is_float</strong></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.php#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$var</code></span>
   )</div>

  <p class="para rdfs-comment">
   Détermine si la variable donnée est de type nombre décimal.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>:
   <p class="para">
    Pour tester si une variable est un nombre ou une chaîne numérique
    (comme les entrées de formulaire, qui sont toujours des chaînes),
    vous devez utiliser la fonction  <span class="function"><a href="function.is-numeric.php" class="function">is_numeric()</a></span>.
   </p>
  </p></blockquote>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.is-float-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">var</code></em></span>
     <dd>

      <p class="para">
       La variable à évaluer.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.is-float-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Retourne <strong><code>TRUE</code></strong> si <em><code class="parameter">var</code></em> est un <a href="language.types.float.php" class="link">nombre décimal</a>,
   <strong><code>FALSE</code></strong> sinon.
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-function.is-float-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-5146">
    <p><strong>Exemple #1 Exemple avec  <span class="function"><strong>is_float()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">is_float</span><span style="color: #007700">(</span><span style="color: #0000BB">27.25</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"is&nbsp;float\n"</span><span style="color: #007700">;<br />}&nbsp;else&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"is&nbsp;not&nbsp;float\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_float</span><span style="color: #007700">(</span><span style="color: #DD0000">'abc'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_float</span><span style="color: #007700">(</span><span style="color: #0000BB">23</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_float</span><span style="color: #007700">(</span><span style="color: #0000BB">23.5</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_float</span><span style="color: #007700">(</span><span style="color: #0000BB">1e7</span><span style="color: #007700">));&nbsp;&nbsp;</span><span style="color: #FF8000">//Notation&nbsp;Scientifique<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_float</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>L&#039;exemple ci-dessus va afficher :</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
is float
bool(false)
bool(false)
bool(true)
bool(true)
bool(false)
</pre></div>
    </div>
   </div>
  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.is-float-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.is-bool.php" class="function" rel="rdfs-seeAlso">is_bool()</a> - D&eacute;termine si une variable est un bool&eacute;en</span></li>
    <li class="member"> <span class="function"><a href="function.is-int.php" class="function" rel="rdfs-seeAlso">is_int()</a> - D&eacute;termine si une variable est de type nombre entier</span></li>
    <li class="member"> <span class="function"><a href="function.is-numeric.php" class="function" rel="rdfs-seeAlso">is_numeric()</a> - D&eacute;termine si une variable est un type num&eacute;rique</span></li>
    <li class="member"> <span class="function"><a href="function.is-string.php" class="function" rel="rdfs-seeAlso">is_string()</a> - D&eacute;termine si une variable est de type cha&icirc;ne de caract&egrave;res</span></li>
    <li class="member"> <span class="function"><a href="function.is-array.php" class="function" rel="rdfs-seeAlso">is_array()</a> - D&eacute;termine si une variable est un tableau</span></li>
    <li class="member"> <span class="function"><a href="function.is-object.php" class="function" rel="rdfs-seeAlso">is_object()</a> - D&eacute;termine si une variable est de type objet</span></li>
   </ul>
  </p>
 </div>

 
</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites