Files
doc-fr/reference/math/functions/hexdec.xml
Yannick Torres 2584899207 sync with EN version
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@166713 c90b9560-bf6c-de11-be94-00142212c4b1
2004-08-18 18:08:51 +00:00

77 lines
2.2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.11 $ -->
<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready -->
<refentry id="function.hexdec">
<refnamediv>
<refname>hexdec</refname>
<refpurpose>Convertit de hexadécimal en décimal</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>number</type><methodname>hexdec</methodname>
<methodparam><type>string</type><parameter>hex_string</parameter></methodparam>
</methodsynopsis>
<para>
<function>hexdec</function> retourne une chaîne contenant la
représentation décimale du nombre
<parameter>hex_string</parameter>. Le nombre le plus grand
qui puisse être converti est 7fffffff en décimal,
ce qui donne "2147483647".
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>
<function>hexdec</function> remplace tous les caractères
non-hexadécimaux par des &zero;. Et si les
zéros de gauche sont ignorés, ceux de droite prennent
le propre valeur.
<example>
<title>Exemple avec <function>hexdec</function></title>
<programlisting role="php">
<![CDATA[
<?php
var_dump(hexdec("Hop comme ceci"));
var_dump(hexdec("0000c000e0cec0"));
var_dump(hexdec("c000e0cec0"));
// les deux affichent "int(14732992)"
var_dump(hexdec("aussi"));
var_dump(hexdec("a0000"));
// les deux affichent "int(655360)"
?>
]]>
</programlisting>
</example>
</para>
<para>
Voir aussi
<function>dechex</function>,
<function>bindec</function>,
<function>octdec</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
-->