cvs: phpdoc-es /reference/array/functions array-merge.xml compact.xml
| From: | Enrique Garcia Briones | Date: | Thu, 27 Jan 2005 19:50:30 +0000 |
| Subject: | cvs: phpdoc-es /reference/array/functions array-merge.xml compact.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-744@lists.php.net to get a copy of this message | ||
baoengb Thu Jan 27 14:50:30 2005 EDT
Modified files:
/phpdoc-es/reference/array/functions array-merge.xml compact.xml
Log:
sync con version inglesa
http://cvs.php.net/diff.php/phpdoc-es/reference/array/functions/array-merge.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc-es/reference/array/functions/array-merge.xml
diff -u phpdoc-es/reference/array/functions/array-merge.xml:1.3
phpdoc-es/reference/array/functions/array-merge.xml:1.4
--- phpdoc-es/reference/array/functions/array-merge.xml:1.3 Tue Nov 9 13:59:09 2004
+++ phpdoc-es/reference/array/functions/array-merge.xml Thu Jan 27 14:50:29 2005
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
-<!-- EN-Revision: 1.14 Maintainer: baoengb Status: ready -->
+<!-- $Revision: 1.4 $ -->
+<!-- EN-Revision: 1.15 Maintainer: baoengb Status: ready -->
<!-- splitted from ./es/functions/array.xml, last change in rev 1.1 -->
<refentry id="function.array-merge">
<refnamediv>
@@ -78,7 +78,7 @@
]]>
</programlisting>
<para>
- ¡No olvide que los índices numéricos serán reenumerados!
+ No olvide que los índices numéricos serán reenumerados
</para>
<screen role="php">
<![CDATA[
@@ -156,6 +156,39 @@
forma "primero en llegar, primero en salir".
</para>
</note>
+ <warning>
+ <para>
+ El comportamient de <function>array_merge</function> fue modificado en
+ PHP 5. A diferencia de PHP 4, la función
<function>array_merge</function>
+ ahora acepta solo parámetros de tipo <type>array</type>. Sin
+ embargo, puede usar forzado de tipos para convertir otros tipos.
+ Vea el siguiente ejemplo para más detalles.
+ </para>
+ <para>
+ <example>
+ <title>Ejemplo PHP 5 <function>array_merge</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$beginning = 'foo';
+$end = array(1 => 'bar');
+$result = array_merge((array)$beginning, (array)$end);
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen role="php">
+<![CDATA[
+Array
+(
+ [0] => foo
+ [1] => bar
+)
+]]>
+ </screen>
+ </example>
+ </para>
+ </warning>
<para>
Vea también
<function>array_merge_recursive</function>,
http://cvs.php.net/diff.php/phpdoc-es/reference/array/functions/compact.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc-es/reference/array/functions/compact.xml
diff -u phpdoc-es/reference/array/functions/compact.xml:1.2
phpdoc-es/reference/array/functions/compact.xml:1.3
--- phpdoc-es/reference/array/functions/compact.xml:1.2 Wed Sep 8 17:22:06 2004
+++ phpdoc-es/reference/array/functions/compact.xml Thu Jan 27 14:50:29 2005
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
-<!-- EN-Revision: 1.7 Maintainer: baoengb Status: ready -->
+<!-- $Revision: 1.3 $ -->
+<!-- EN-Revision: 1.8 Maintainer: baoengb Status: ready -->
<!-- splitted from ./es/functions/array.xml, last change in rev 1.1 -->
<refentry id="function.compact">
<refnamediv>
@@ -34,6 +34,16 @@
<para>
Cualquier cadena que no haya sido definida simplemente se evitará.
</para>
+ <note>
+ <title>Gotcha</title>
+ <para>
+ A causa de que <link linkend="language.variables.variable">Variables
+ variables</link> no puede ser usada con las
+ <link linkend="language.variables.superglobals">Superglobal
+ arrays</link> de PHP dentro de funciones, las matrices Superglobal no
+ pueden ser pasadas a <function>compact</function>.
+ </para>
+ </note>
<para>
<example>
<title>Ejemplo de <function>compact</function></title>