Files
doc-fr/reference/math/functions/bindec.xml
Yannick Torres 6c91161986 sync with EN
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@187125 c90b9560-bf6c-de11-be94-00142212c4b1
2005-05-27 22:53:33 +00:00

79 lines
2.0 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.12 $ -->
<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready -->
<refentry id="function.bindec">
<refnamediv>
<refname>bindec</refname>
<refpurpose>Convertit de binaire en décimal</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;
<methodsynopsis>
<type>number</type><methodname>bindec</methodname>
<methodparam><type>string</type><parameter>binary_string</parameter></methodparam>
</methodsynopsis>
<para>
<function>bindec</function> retourne la conversion d'un nombre
binaire représenté par la chaîne
<parameter>binary_string</parameter> en décimal.
</para>
<para>
<function>bindec</function> convertit un nombre binaire en décimal.
Le plus grand nombre convertible a 31 bits à 1, soit
2147483647 en décimal.
Depuis &php; 4.1.0, cette fonction peut également convertir de très grands nombres.
Elle retourne un nombre de type <type>float</type> dans ce cas.
</para>
<para>
<example>
<title>Exemple avec <function>bindec</function></title>
<programlisting role="php">
<![CDATA[
<?php
echo bindec('110011') . "\n";
echo bindec('000110011') . "\n";
echo bindec('111');
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
51
51
7
]]>
</screen>
</example>
</para>
<para>
Voir aussi
<function>decbin</function>,
<function>octdec</function>,
<function>hexdec</function> et
<function>base_convert</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->