php-doc-en/reference/math/functions/decoct.xml

101 lines
2.5 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.decoct" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>decoct</refname>
<refpurpose>Decimal to octal</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>decoct</methodname>
<methodparam><type>int</type><parameter>number</parameter></methodparam>
</methodsynopsis>
<para>
Returns a string containing an octal representation of the given
<parameter>number</parameter> argument. The largest number that can be
converted depends on the platform in use. For 32-bit platforms this is
usually <literal>4294967295</literal> in decimal resulting in
<literal>37777777777</literal>. For 64-bit platforms this is usually
<literal>9223372036854775807</literal> in decimal resulting in
<literal>777777777777777777777</literal>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>number</parameter></term>
<listitem>
<para>
Decimal value to convert
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Octal string representation of <parameter>number</parameter>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>decoct</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo decoct(15) . "\n";
echo decoct(264);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
17
410
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>octdec</function></member>
<member><function>decbin</function></member>
<member><function>dechex</function></member>
<member><function>base_convert</function></member>
</simplelist>
</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:"~/.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
-->