svn: /phpdoc/es/trunk/reference/array/functions/ array-reduce.xml

From: Date: Thu, 06 May 2010 05:46:52 +0000
Subject: svn: /phpdoc/es/trunk/reference/array/functions/ array-reduce.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-2619@lists.php.net to get a copy of this message
yago Thu, 06 May 2010 05:46:52 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=299050 Log: Cada día un poco más. Changed paths: U phpdoc/es/trunk/reference/array/functions/array-reduce.xml Modified: phpdoc/es/trunk/reference/array/functions/array-reduce.xml =================================================================== --- phpdoc/es/trunk/reference/array/functions/array-reduce.xml 2010-05-06 05:36:17 UTC (rev 299049) +++ phpdoc/es/trunk/reference/array/functions/array-reduce.xml 2010-05-06 05:46:52 UTC (rev 299050) @@ -1,24 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 288721 Maintainer: lboshell Status: ready --> +<!-- EN-Revision: 298259 Maintainer: yago Status: ready --> <refentry xml:id="function.array-reduce" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>array_reduce</refname> - <refpurpose>Reduce iterativamente una matriz a un solo valor usando una - función llamada de retorno</refpurpose> + <refpurpose>Reduce iterativamente una matriz a un solo valor usando una función llamada de retorno</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>mixed</type><methodname>array_reduce</methodname> - <methodparam><type>array</type><parameter>entrada</parameter></methodparam> - <methodparam><type>callback</type><parameter>funcion</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>inicial</parameter></methodparam> + <methodparam><type>array</type><parameter>input</parameter></methodparam> + <methodparam><type>callback</type><parameter>function</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>initial</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> <function>array_reduce</function> aplica iterativamente la función - <parameter>funcion</parameter> a los elementos de la matriz - <parameter>entrada</parameter>, con el propósito de reducir la matriz a + <parameter>function</parameter> a los elementos de la matriz + <parameter>input</parameter>, con el propósito de reducir la matriz a un solo valor. </para> </refsect1> @@ -27,7 +26,7 @@ <para> <variablelist> <varlistentry> - <term><parameter>entrada</parameter></term> + <term><parameter>input</parameter></term> <listitem> <para> La matriz de entrada. @@ -35,7 +34,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>funcion</parameter></term> + <term><parameter>function</parameter></term> <listitem> <para> La función usada como llamada de retorno. @@ -43,7 +42,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>inicial</parameter></term> + <term><parameter>initial</parameter></term> <listitem> <para> Si el parámetro opcional <parameter>inicial</parameter> está @@ -61,11 +60,33 @@ Devuelve el valor resultante. </para> <para> - Si la matriz está vacía y no se pasa el parámetro - <parameter>inicial</parameter>, <function>array_reduce</function> - devuelve &null;. + Si la matriz está vacía y no se pasa el parámetro <parameter>initial</parameter>, + <function>array_reduce</function> devuelve &null;. </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.3.0</entry> + <entry> + Cambiado parámetro <parameter>initial</parameter> para permitir <type>mixed</type>, anteriormente <type>integer</type>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> @@ -90,7 +111,7 @@ $x = array(); $b = array_reduce($a, "rsum"); $c = array_reduce($a, "rmul", 10); -$d = array_reduce($x, "rsum", 1); +$d = array_reduce($x, "rsum", "No data to reduce"); ?> ]]> </programlisting> @@ -98,7 +119,7 @@ Esto resultará en que <varname>$b</varname> contenga <literal>15</literal>, <varname>$c</varname> contenga <literal>1200</literal> (= 10*1*2*3*4*5), y <varname>$d</varname> - contenga <literal>1</literal>. + contenga <literal>No datos a reducir</literal>. </para> </example> </para>

« previous php.doc.es (#2619) next »