svn: /phpdoc/en/trunk/language/types/ integer.xml
| From: | Fábio Luciano Nogueira de Góis | Date: | Sun, 19 Jun 2016 20:31:19 +0000 |
| Subject: | svn: /phpdoc/en/trunk/language/types/ integer.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-14208@lists.php.net to get a copy of this message | ||
fabioluciano Sun, 19 Jun 2016 20:31:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=339405
Log:
updating manual
Changed paths:
U phpdoc/en/trunk/language/types/integer.xml
Modified: phpdoc/en/trunk/language/types/integer.xml
===================================================================
--- phpdoc/en/trunk/language/types/integer.xml 2016-06-19 20:05:12 UTC (rev 339404)
+++ phpdoc/en/trunk/language/types/integer.xml 2016-06-19 20:31:19 UTC (rev 339405)
@@ -2,12 +2,12 @@
<!-- $Revision$ -->
<sect1 xml:id="language.types.integer">
<title>Integers</title>
-
+
<simpara>
An <type>integer</type> is a number of the set
ℤ = {..., -2, -1, 0, 1, 2, ...}.
</simpara>
-
+
<para>
See also:
</para>
@@ -40,7 +40,7 @@
</simpara>
<para>
- Binary <type>integer</type> literals are available since PHP 5.4.0.
+ Binary <type>integer</type> literals are available since PHP 5.4.0.
</para>
<para>
@@ -67,7 +67,7 @@
<para>
Formally, the structure for <type>integer</type> literals is:
</para>
-
+
<informalexample>
<programlisting>
<![CDATA[
@@ -156,7 +156,7 @@
]]>
</programlisting>
</example>
-
+
<para>
There is no <type>integer</type> division operator in PHP.
<literal>1/2</literal> yields the <type>float</type>
<literal>0.5</literal>.
@@ -168,9 +168,9 @@
<programlisting role="php">
<![CDATA[
<?php
-var_dump(25/7); // float(3.5714285714286)
+var_dump(25/7); // float(3.5714285714286)
var_dump((int) (25/7)); // int(3)
-var_dump(round(25/7)); // float(4)
+var_dump(round(25/7)); // float(4)
?>
]]>
</programlisting>
@@ -198,7 +198,7 @@
<simpara>
See also <link linkend="language.types.type-juggling">Type
Juggling</link>.
</simpara>
-
+
<sect3 xml:id="language.types.integer.casting.from-boolean">
<title>From <link
linkend="language.types.boolean">booleans</link></title>
@@ -211,13 +211,13 @@
<sect3 xml:id="language.types.integer.casting.from-float">
<title>
From <link linkend="language.types.float">floating point numbers</link>
- </title>
+ </title>
<simpara>
When converting from <type>float</type> to <type>integer</type>, the
number
will be rounded <emphasis>towards zero</emphasis>.
</simpara>
-
+
<para>
If the float is beyond the boundaries of <type>integer</type> (usually
<literal>+/- 2.15e+9 = 2^31</literal> on 32-bit platforms and
@@ -229,11 +229,11 @@
<note>
<para>
- Instead of being undefined and platform-dependent, NaN and Infinity will
- always be zero when cast to integer as of PHP 7.0.0.
+ As of PHP 7.0.0, instead of being undefined and platform-dependent, NaN and Infinity will
+ always be zero when cast to <type>integer</type>.
</para>
</note>
-
+
<warning>
<para>
Never cast an unknown fraction to <type>integer</type>, as this can
@@ -249,14 +249,14 @@
]]>
</programlisting>
</informalexample>
-
+
<para>
See also the <link linkend="warn.float-precision">warning about float
precision</link>.
</para>
</warning>
</sect3>
-
+
<sect3 xml:id="language.types.integer.casting.from-string">
<title>From strings</title>
@@ -265,7 +265,7 @@
numbers</link>
</simpara>
</sect3>
-
+
<sect3 xml:id="language.types.integer.casting.from-other">
<title>From other types</title>
@@ -280,7 +280,7 @@
</sect2>
</sect1>
-
+
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml