svn: /phpdoc/es/trunk/reference/var/functions/ floatval.xml intval.xml is-bool.xml is-buffer.xml is-numeric.xml
| From: | Yago Ferrer | Date: | Sat, 13 Feb 2010 22:44:41 +0000 |
| Subject: | svn: /phpdoc/es/trunk/reference/var/functions/ floatval.xml intval.xml is-bool.xml is-buffer.xml is-numeric.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-2052@lists.php.net to get a copy of this message | ||
yago Sat, 13 Feb 2010 22:44:41 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=295030
Log:
Revisando a última versión en Inglés.
Changed paths:
U phpdoc/es/trunk/reference/var/functions/floatval.xml
U phpdoc/es/trunk/reference/var/functions/intval.xml
U phpdoc/es/trunk/reference/var/functions/is-bool.xml
U phpdoc/es/trunk/reference/var/functions/is-buffer.xml
U phpdoc/es/trunk/reference/var/functions/is-numeric.xml
Modified: phpdoc/es/trunk/reference/var/functions/floatval.xml
===================================================================
--- phpdoc/es/trunk/reference/var/functions/floatval.xml 2010-02-13 21:50:35 UTC (rev 295029)
+++ phpdoc/es/trunk/reference/var/functions/floatval.xml 2010-02-13 22:44:41 UTC (rev 295030)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 288721 $ -->
-<!-- EN-Revision: 288721 Maintainer: jesusruiz Status: ready -->
+<!-- $Revision: 293043 $ -->
+<!-- EN-Revision: 293043 Maintainer: jesusruiz Status: ready -->
<refentry xml:id="function.floatval" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>floatval</refname>
@@ -22,10 +22,11 @@
<variablelist>
<varlistentry>
<term><parameter>var</parameter></term>
- <listitem>
- <para>
- Puede ser cualquier tipo escalar. No se puede utilizar
<function>floatval</function>
- en matrices u objetos.
+ <listitem>
+ <para>
+ Puede ser cualquier tipo escalar. No se puede utilizar
<function>floatval</function>
+ en objetos, si es usado emitirá un error de nivel <constant>E_NOTICE</constant>
y
+ devolverá 1.
</para>
</listitem>
</varlistentry>
@@ -35,7 +36,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- El valor flotante de la variable dada.
+ El valor flotante de la variable dada. Arrays vacios devolverán 0, arrays no vacios
+ devolverán 1.
</para>
</refsect1>
<refsect1 role="examples">
Modified: phpdoc/es/trunk/reference/var/functions/intval.xml
===================================================================
--- phpdoc/es/trunk/reference/var/functions/intval.xml 2010-02-13 21:50:35 UTC (rev 295029)
+++ phpdoc/es/trunk/reference/var/functions/intval.xml 2010-02-13 22:44:41 UTC (rev 295030)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 291316 $ -->
-<!-- EN-Revision: 291316 Maintainer: jesusruiz Status: ready -->
+<!-- $Revision: 293045 $ -->
+<!-- EN-Revision: 293045 Maintainer: jesusruiz Status: ready -->
<refentry xml:id="function.intval" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>intval</refname>
@@ -17,7 +17,8 @@
<para>
Devuelve el valor <type>integer</type> de una
<parameter>var</parameter>,
con la especificada <parameter>base</parameter> para la conversión
- (por defecto es base 10).
+ (por defecto es base 10). No debería ser usado en objectos, si es usado
+ emitirá un error de nivel <constant>E_NOTICE</constant> y devolverá 1.
</para>
</refsect1>
@@ -91,7 +92,9 @@
echo intval(420000000000000000000); // 0
echo intval('420000000000000000000'); // 2147483647
echo intval(42, 8); // 42
-echo intval('42', 8); // 34
+echo intval('42', 8); // 34
+echo intval(array()); // 0
+echo intval(array('foo', 'bar')); // 1
?>
]]>
</programlisting>
Modified: phpdoc/es/trunk/reference/var/functions/is-bool.xml
===================================================================
--- phpdoc/es/trunk/reference/var/functions/is-bool.xml 2010-02-13 21:50:35 UTC (rev 295029)
+++ phpdoc/es/trunk/reference/var/functions/is-bool.xml 2010-02-13 22:44:41 UTC (rev 295030)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 288721 $ -->
-<!-- EN-Revision: 288721 Maintainer: jesusruiz Status: ready -->
+<!-- $Revision: 293064 $ -->
+<!-- EN-Revision: 293064 Maintainer: jesusruiz Status: ready -->
<refentry xml:id="function.is-bool" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>is_bool</refname>
Modified: phpdoc/es/trunk/reference/var/functions/is-buffer.xml
===================================================================
--- phpdoc/es/trunk/reference/var/functions/is-buffer.xml 2010-02-13 21:50:35 UTC (rev 295029)
+++ phpdoc/es/trunk/reference/var/functions/is-buffer.xml 2010-02-13 22:44:41 UTC (rev 295030)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 288721 $ -->
-<!-- EN-Revision: 288721 Maintainer: jesusruiz Status: ready -->
+<!-- $Revision: 294415 $ -->
+<!-- EN-Revision: 294415 Maintainer: jesusruiz Status: ready -->
<refentry xml:id="function.is-buffer" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>is_buffer</refname>
@@ -54,25 +54,25 @@
<?php
// Declarar algunas variables con diferentes tipos
$types = array(
- 'unicode' => 'Cadena Unicode',
- 'binary' => b'Cadena binaria',
- 'resource' => fopen('php://stdin', 'r'),
- 'integer' => 42
- );
+ 'unicode' => 'Cadena Unicode',
+ 'binary' => b'Cadena binaria',
+ 'resource' => fopen('php://stdin', 'r'),
+ 'integer' => 42
+ );
// Comprobar cuáles tipos son buffer
foreach($types as $type => $value)
{
- if(is_buffer($value))
- {
- echo $type . ' es una cadena Unicode o binaria';
- }
- else
- {
- echo $type . ' no contiene un valor buffer';
- }
+ if(is_buffer($value))
+ {
+ echo $type . ' es una cadena Unicode o binaria';
+ }
+ else
+ {
+ echo $type . ' no contiene un valor buffer';
+ }
- echo PHP_EOL;
+ echo PHP_EOL;
}
?>
]]>
Modified: phpdoc/es/trunk/reference/var/functions/is-numeric.xml
===================================================================
--- phpdoc/es/trunk/reference/var/functions/is-numeric.xml 2010-02-13 21:50:35 UTC (rev 295029)
+++ phpdoc/es/trunk/reference/var/functions/is-numeric.xml 2010-02-13 22:44:41 UTC (rev 295030)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 288721 $ -->
-<!-- EN-Revision: 288721 Maintainer: jesusruiz Status: ready -->
+<!-- $Revision: 294837 $ -->
+<!-- EN-Revision: 294837 Maintainer: jesusruiz Status: ready -->
<refentry xml:id="function.is-numeric" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>is_numeric</refname>
@@ -57,28 +57,39 @@
<![CDATA[
<?php
$pruebas = Array(
- "42",
- 1337,
- "1e4",
- "no numérica",
- Array(),
- 9.1
- );
+ "42",
+ 1337,
+ "1e4",
+ "no numérica",
+ Array(),
+ 9.1
+ );
foreach($pruebas as $element)
{
- if(is_numeric($element))
- {
- echo "'{$element}' es numérica", PHP_EOL;
- }
- else
- {
- echo "'{$element}' NO es numérica", PHP_EOL;
- }
+ if(is_numeric($element))
+ {
+ echo "'{$element}' es numérica", PHP_EOL;
+ }
+ else
+ {
+ echo "'{$element}' NO es numérica", PHP_EOL;
+ }
}
?>
]]>
- </programlisting>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+'42' es numérico
+'1337' es numérico
+'1e4' es numérico
+'not numeric' NO es numérico
+'Array' NO es numérico
+'9.1' es numérico
+]]>
+ </screen>
</example>
</para>
</refsect1>