mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
added example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146663 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f53a79c681
commit
5270d15f58
1 changed files with 26 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.bindec">
|
||||
<refnamediv>
|
||||
|
@ -21,6 +21,31 @@
|
|||
<type>integer</type>. The largest number that can be converted is
|
||||
31 bits of 1's or 2147483647 in decimal.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>bindec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo bindec('110011') . "\n";
|
||||
echo bindec('000110011') . "\n";
|
||||
|
||||
echo bindec('111');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
The above example will output:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
51
|
||||
51
|
||||
7
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>decbin</function>,
|
||||
<function>octdec</function>,
|
||||
|
|
Loading…
Reference in a new issue