mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-25 05:18:56 +00:00
57 lines
1.6 KiB
XML
57 lines
1.6 KiB
XML
![]() |
<?xml version="1.0" encoding="iso-8859-1"?>
|
||
|
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
|
||
|
<refentry id="function.floor">
|
||
|
<refnamediv>
|
||
|
<refname>floor</refname>
|
||
|
<refpurpose>Round fractions down</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<methodsynopsis>
|
||
|
<type>float</type><methodname>floor</methodname>
|
||
|
<methodparam><type>float</type><parameter>value</parameter></methodparam>
|
||
|
</methodsynopsis>
|
||
|
<simpara>
|
||
|
Returns the next lowest integer value by rounding down
|
||
|
<parameter>value</parameter> if necessary.
|
||
|
The return value of <function>floor</function> is still of type
|
||
|
<type>float</type> because the value range of <type>float</type> is
|
||
|
usually bigger than that of <type>int</type>.
|
||
|
</simpara>
|
||
|
<example>
|
||
|
<title><function>floor</function> examples</title>
|
||
|
<programlisting role="php">
|
||
|
<![CDATA[
|
||
|
$four = floor(4.3); // $four = 4.0;
|
||
|
$nine = floor(9.999); // $nine = 9.0;
|
||
|
]]>
|
||
|
</programlisting>
|
||
|
</example>
|
||
|
<simpara>
|
||
|
See also <function>ceil</function> and
|
||
|
<function>round</function>.
|
||
|
</simpara>
|
||
|
</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
|
||
|
-->
|