cvs: phpdoc-it /reference/array/functions array-filter.xml array-map.xml array-push.xml array-reduce.xml array-walk.xml

From: Date: Sun, 01 Feb 2004 11:01:01 +0000
Subject: cvs: phpdoc-it /reference/array/functions array-filter.xml array-map.xml array-push.xml array-reduce.xml array-walk.xml
Groups: php.doc.it 
Request: Send a blank email to doc-it+get-536@lists.php.net to get a copy of this message
cucinato Sun Feb 1 06:01:01 2004 EDT Modified files: /phpdoc-it/reference/array/functions array-filter.xml array-map.xml array-push.xml array-reduce.xml array-walk.xml Log: Sync to EN tree http://cvs.php.net/diff.php/phpdoc-it/reference/array/functions/array-filter.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-it/reference/array/functions/array-filter.xml diff -u phpdoc-it/reference/array/functions/array-filter.xml:1.7 phpdoc-it/reference/array/functions/array-filter.xml:1.8 --- phpdoc-it/reference/array/functions/array-filter.xml:1.7 Mon Dec 8 07:07:20 2003 +++ phpdoc-it/reference/array/functions/array-filter.xml Sun Feb 1 06:01:00 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.13 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.14 Maintainer: cucinato Status: ready --> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-filter' in en/ tree in rev 1.62 --> <!-- OLD-Revision: 1.173/EN.1.62 --> @@ -31,11 +31,13 @@ <programlisting role="php"> <![CDATA[ <?php -function dispari($var) { +function dispari($var) +{ return($var % 2 == 1); } -function pari($var) { +function pari($var) +{ return($var % 2 == 0); } http://cvs.php.net/diff.php/phpdoc-it/reference/array/functions/array-map.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-it/reference/array/functions/array-map.xml diff -u phpdoc-it/reference/array/functions/array-map.xml:1.7 phpdoc-it/reference/array/functions/array-map.xml:1.8 --- phpdoc-it/reference/array/functions/array-map.xml:1.7 Mon Dec 8 16:52:39 2003 +++ phpdoc-it/reference/array/functions/array-map.xml Sun Feb 1 06:01:00 2004 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-map' in en/ tree in rev 1.62 --> -<!-- EN-Revision: 1.10 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.11 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.62 --> <refentry id="function.array-map"> <refnamediv> @@ -33,7 +33,8 @@ <programlisting role="php"> <![CDATA[ <?php -function cubo($n) { +function cubo($n) +{ return($n * $n * $n); } @@ -66,11 +67,13 @@ <programlisting role="php"> <![CDATA[ <?php -function mostra_Spagnolo($n, $m) { +function mostra_Spagnolo($n, $m) +{ return("Il numero $n si dice $m in Spagnolo"); } -function mappa_Spagnolo($n, $m) { +function mappa_Spagnolo($n, $m) +{ return(array($n => $m)); } http://cvs.php.net/diff.php/phpdoc-it/reference/array/functions/array-push.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/array/functions/array-push.xml diff -u phpdoc-it/reference/array/functions/array-push.xml:1.5 phpdoc-it/reference/array/functions/array-push.xml:1.6 --- phpdoc-it/reference/array/functions/array-push.xml:1.5 Mon Dec 8 16:52:39 2003 +++ phpdoc-it/reference/array/functions/array-push.xml Sun Feb 1 06:01:00 2004 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-push' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.8 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.9 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-push"> <refnamediv> @@ -65,6 +65,13 @@ </screen> </example> </para> + <note> + <simpara> + Se si utilizza <function>array_push</function> per aggiungere un elemento + all'array, è preferibile piuttosto utilizzare <literal>$array[] = </literal> poiché in questo + modo non c'è il tempo d'attesa per la chiamata di funzione. + </simpara> + </note> <para> Vedere anche <function>array_pop</function>, <function>array_shift</function> e http://cvs.php.net/diff.php/phpdoc-it/reference/array/functions/array-reduce.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/array/functions/array-reduce.xml diff -u phpdoc-it/reference/array/functions/array-reduce.xml:1.5 phpdoc-it/reference/array/functions/array-reduce.xml:1.6 --- phpdoc-it/reference/array/functions/array-reduce.xml:1.5 Mon Dec 8 16:52:39 2003 +++ phpdoc-it/reference/array/functions/array-reduce.xml Sun Feb 1 06:01:00 2004 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.11 --> <!-- last change to 'array-reduce' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.7 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-reduce"> <refnamediv> @@ -33,12 +33,14 @@ <programlisting role="php"> <![CDATA[ <?php -function rsum($v, $w) { +function rsum($v, $w) +{ $v += $w; return $v; } -function rmul($v, $w) { +function rmul($v, $w) +{ $v *= $w; return $v; } http://cvs.php.net/diff.php/phpdoc-it/reference/array/functions/array-walk.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc-it/reference/array/functions/array-walk.xml diff -u phpdoc-it/reference/array/functions/array-walk.xml:1.9 phpdoc-it/reference/array/functions/array-walk.xml:1.10 --- phpdoc-it/reference/array/functions/array-walk.xml:1.9 Sat Jan 3 09:39:14 2004 +++ phpdoc-it/reference/array/functions/array-walk.xml Sun Feb 1 06:01:00 2004 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/array.xml, last change in rev 1.1 --> <!-- last change to 'array-walk' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.13 Maintainer: cucinato Status: ready --> +<!-- EN-Revision: 1.14 Maintainer: cucinato Status: ready --> <!-- OLD-Revision: 1.173/EN.1.2 --> <refentry id="function.array-walk"> <refnamediv> @@ -79,11 +79,13 @@ <?php $frutta = array("d"=>"limone", "a"=>"arancia", "b"=>"banana", "c"=>"mela"); -function modifica(&$elemento1, $chiave, $prefisso) { +function modifica(&$elemento1, $chiave, $prefisso) +{ $elemento1 = "$prefisso: $elemento1"; } -function stampa($elemento2, $chiave) { +function stampa($elemento2, $chiave) +{ echo "$chiave. $elemento2<br />\n"; }

« previous php.doc.it (#536) next »