mirror of
https://github.com/php/doc-it.git
synced 2026-03-24 07:32:12 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@314704 c90b9560-bf6c-de11-be94-00142212c4b1
76 lines
2.5 KiB
XML
76 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- EN-Revision: n/a Maintainer: cortesi Status: ready -->
|
|
<refentry xml:id="function.base-convert" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>base_convert</refname>
|
|
<refpurpose>Converte un numero fra basi arbitrarie</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descrizione</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>base_convert</methodname>
|
|
<methodparam><type>string</type><parameter>numero</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>base_di_partenza</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>base_di_arrivo</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Restituisce una stringa contenente <parameter>numero</parameter>
|
|
rappresentata in base <parameter>base_di_arrivo</parameter>. La base in
|
|
cui <parameter>numero</parameter> è dato è specificata da
|
|
<parameter>base_di_partenza</parameter>. Entrambe
|
|
<parameter>base_di_partenza</parameter> e <parameter>base_di_arrivo</parameter>
|
|
devono essere comprese fra 2 e 36, inclusi. Cifre in numeri con una
|
|
base maggiore di 10 saranno rappresentati con le lettere a-z,
|
|
con a significante 10, b significante 11 e z significante 35.
|
|
<example>
|
|
<title>Esempio di uso di <function>base_convert</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$hexadecimal = 'A37334';
|
|
echo base_convert($hexadecimal, 16, 2);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
Visualizza:
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
101000110111001100110100
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<warning>
|
|
<simpara>
|
|
La funzione <function>base_convert</function> può perdere di precisione con numeri molto grandi
|
|
a causa delle proprietà dei tipi "double" o "float" utilizzati internamente.
|
|
Fare riferimento alla sezione <link linkend="language.types.float">Floating point numbers</link>
|
|
del manuale per informazioni specifiche e per le limitazione.
|
|
</simpara>
|
|
</warning>
|
|
</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:"~/.phpdoc/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
|
|
-->
|