Contributions are ready for review
| From: | doc-it at lists dot php dot net | Date: | Mon, 05 Oct 2015 12:00:04 +0000 |
| Subject: | Contributions are ready for review | ||
| Groups: | php.doc.it | ||
| Request: | Send a blank email to doc-it+get-1920@lists.php.net to get a copy of this message | ||
Hello PHP IT Documentation team,
There are contributions within the online editor queue for this language.
Please review, then commit or delete these patches.
Patches for review :
-----------------------
New file: it/reference/misc/functions/eval.xml
By: Federico Reghenzani on 2014-03-08 22:36:50
===================================================================
--- it/reference/misc/functions/eval.xml
+++ it/reference/misc/functions/eval.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 321375 Maintainer: Federico Reghenzani Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.eval" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>eval</refname>
+ <refpurpose>Esegue una stringa come codice PHP</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>mixed</type><methodname>eval</methodname>
+
<methodparam><type>string</type><parameter>code</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ Esegue la data stringa <parameter>code</parameter> come codcie PHP.
+ </para>
+ <caution>
+ <para>
+ <function>eval</function> è un costrutto del linguaggio <emphasis>molto
pericoloso</emphasis>
+ perché permette l'esecuzione di codice PHP arbitrario. <emphasis>Il suo uso è
pertanto
+ sconsigliato.</emphasis> Se si è certi che non esistono altre soluzioni al posto di
usare
+ <function>eval</function>, fare particolare attenzione a <emphasis>non
inserire codice fornito
+ dall'utente</emphasis> senza averlo preventivamente validato.
+ </para>
+ </caution>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>code</parameter></term>
+ <listitem>
+ <para>
+ Codice PHP valido da eseguire.
+ </para>
+ <para>
+ Il codice non deve essere incluso nei <link
linkend="language.basic-syntax.phpmode">tag
+ di apertura e chisura</link> di PHP. Ad esempio <literal>'echo
"Ciao!";'</literal>
+ è corretto invece di <literal>'<? echo "Ciao!";
>'</literal>.
+ E' comunque possibile lasciare il codice PHP (per tornare ad esempio in HTML):
+ <literal>'echo "In PHP mode!"; ?>In HTML mode!<? echo
"Back in PHP mode!";'</literal>.
+ </para>
+ <para>
+ Oltre a questo, valgono tutte le regole del codice PHP, incluso l'inserimento al
termine
+ di ogni istruzione del punto e virgola.
+ <literal>'echo "Ciao!"'</literal> causerà un parse error,
mentre
+ <literal>'echo "Ciao!";'</literal> funziona.
+ </para>
+ <para>
+ Un'istruzione <literal>return</literal> causa immediatamente la
terminazione del codice
+ in corso di esecuzione dalla <function>eval</function>.
+ </para>
+ <para>
+ L'ambito di esecuzione è ristretto a dove <function>eval</function> viene
chiamata, quindi
+ qualsiasi variabile definita o modificata al suo interno rimarrà visibile dopo la sua
+ terminazione.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ <function>eval</function> ritorna &null; a meno che
+ <literal>return</literal> è chiamata nel codice da valutare, in tal caso
+ il valore passato a <literal>return</literal> viene ritornato. Se avviene
+ un parse error, <function>eval</function> ritorna
+ &false; e l'esecuzione del codice seguente continua normalmente. Non
+ è possibile catturare un parse error in <function>eval</function>
+ usando <function>set_error_handler</function>.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>eval</function> Esempio</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$string = 'cup';
+$name = 'coffee';
+$str = 'This is a $string with my $name in it.';
+echo $str. "n";
+eval("$str = "$str";");
+echo $str. "n";
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+This is a $string with my $name in it.
+This is a cup with my coffee in it.
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+
+ ¬e.language-construct;
+
+ &tip.ob-capture;
+ <note>
+ <para>
+ In caso di fatal error nel codce valutato, l'intero script termina.
+ </para>
+ </note>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>call_user_func</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52764
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52764
------------------------------------------------------------------
New file: it/reference/misc/functions/die.xml
By: Federico Reghenzani on 2014-03-08 22:37:53
===================================================================
--- it/reference/misc/functions/die.xml
+++ it/reference/misc/functions/die.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 325214 Maintainer: Federico Reghenzani Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.die" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>die</refname>
+ <refpurpose>Equivale a <literal>exit</literal></refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <para>
+ Questo costrutto è equivalente a <function>exit</function>.
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52765
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52765
------------------------------------------------------------------
New file: it/reference/misc/functions/defined.xml
By: Federico Reghenzani on 2014-03-11 03:25:07
===================================================================
--- it/reference/misc/functions/defined.xml
+++ it/reference/misc/functions/defined.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 297028 Maintainer: Federico Reghenzani Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.defined" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>defined</refname>
+ <refpurpose>Verifica se dato nome di una costante, essa esiste</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>bool</type><methodname>defined</methodname>
+
<methodparam><type>string</type><parameter>name</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ Verifica se la data costante esiste ed è definita.
+ </para>
+ <note>
+ <para>
+ Se vuoi verificare che una funzione esista usa
<function>function_exists</function>.
+ Se vuoi verificare invece che una variabile esista, usa <function>isset</function>
+ infatti <function>defined</function> si applica solo a <link
+ linkend="language.constants">constants</link>.
+ </para>
+ </note>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>name</parameter></term>
+ <listitem>
+ <para>
+ Il nome della costante.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Ritorna &true; se il nome della costante specificato da
<parameter>name</parameter>
+ è stata definita, &false; altrimenti.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Controllo Costanti</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+/* Notare l'uso degli apici. Questo esempio controlla se la stringa
+ * 'TEST' e' il nome di una costante esistente TEST */
+if (defined('TEST')) {
+ echo TEST;
+}
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>define</function></member>
+ <member><function>constant</function></member>
+ <member><function>get_defined_constants</function></member>
+ <member><function>function_exists</function></member>
+ <member><link
linkend="language.constants">Costanti</link></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52766
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52766
------------------------------------------------------------------
New file: it/reference/misc/functions/define.xml
By: Federico Reghenzani on 2014-03-11 03:33:23
===================================================================
--- it/reference/misc/functions/define.xml
+++ it/reference/misc/functions/define.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 297028 Maintainer: Federico Reghenzani Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.define" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>define</refname>
+ <refpurpose>Definisce una costante</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>bool</type><methodname>define</methodname>
+
<methodparam><type>string</type><parameter>name</parameter></methodparam>
+
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
+ <methodparam
choice="opt"><type>bool</type><parameter>case_insensitive</parameter><initializer>false</initializer></methodparam>
+ </methodsynopsis>
+ <para>
+ Definisce una costante alfanumerica durante l'esecuzione.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>name</parameter></term>
+ <listitem>
+ <para>
+ Il nome della costante.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>value</parameter></term>
+ <listitem>
+ <para>
+ Il valore della costante; solo valori scalari e &null; sono consentiti.
+
+ I valori scalari comprendono <type>integer</type>,
+ <type>float</type>, <type>string</type> o
<type>boolean</type>.
+ E' anche possibile definire costanti di tipo <type>resource</type>
+ tuttavia non è raccomandato e può causare comportamenti imprevedibili.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>case_insensitive</parameter></term>
+ <listitem>
+ <para>
+ Se settato a &true;, la costante viene definita case-insensitive.
+ Il comportamento di default è case-sensitive; per esempio
+ <literal>CONSTANT</literal> e <literal>Constant</literal>
rappresentano
+ valori diversi.
+ </para>
+ <note>
+ <para>
+ Le costanti case-insensitive vengono salvate internamente in minuscolo.
+ </para>
+ </note>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &return.success;
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Definire costanti</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+define("CONSTANT", "Ciao Mondo!");
+echo CONSTANT; // output "Ciao Mondo!"
+echo Constant; // output "Ciao Mondo!" e genera un notice.
+
+define("GREETING", "Ciao Mondo!", true);
+echo GREETING; // output "Ciao Mondo!"
+echo Greeting; // output "Ciao Mondo!"
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>defined</function></member>
+ <member><function>constant</function></member>
+ <member>La sezione <link
linkend="language.constants">Costanti</link></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52816
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52816
------------------------------------------------------------------
New file: it/reference/misc/functions/usleep.xml
By: Federico Reghenzani on 2014-03-11 03:38:55
===================================================================
--- it/reference/misc/functions/usleep.xml
+++ it/reference/misc/functions/usleep.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 297028 Maintainer: Federico Reghenzani Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.usleep" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>usleep</refname>
+ <refpurpose>Delay execution in microseconds</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>void</type><methodname>usleep</methodname>
+
<methodparam><type>int</type><parameter>micro_seconds</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ Mette in pausa l'esecuzione del programma per il numero indicato di micro-secondi.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>micro_seconds</parameter></term>
+ <listitem>
+ <para>
+ Tempo di pausa in micro-secondi. Un micro-secondo è un milionesimo di secondo.
+ second.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &return.void;
+ </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.0.0</entry>
+ <entry>
+ Questa funzione ora funziona anche sui sistemi windows.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Esempio <function>usleep</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+// Current time
+echo date('h:i:s') . "n";
+
+// wait for 2 seconds
+usleep(2000000);
+
+// back!
+echo date('h:i:s') . "n";
+
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+11:13:28
+11:13:30
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>sleep</function></member>
+ <member><function>time_nanosleep</function></member>
+ <member><function>time_sleep_until</function></member>
+ <member><function>set_time_limit</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52818
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52818
------------------------------------------------------------------
New file: it/reference/misc/functions/show-source.xml
By: Federico Reghenzani on 2014-03-11 03:39:11
===================================================================
--- it/reference/misc/functions/show-source.xml
+++ it/reference/misc/functions/show-source.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 288721 Maintainer: Federico Reghenzani Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.show-source" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>show_source</refname>
+ <refpurpose>&Alias; <function>highlight_file</function></refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <simpara>
+ &info.function.alias;
+ <function>highlight_file</function>.
+ </simpara>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52819
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52819
------------------------------------------------------------------
New file: it/reference/misc/functions/highlight-file.xml
By: Federico Reghenzani on 2014-03-11 03:44:52
===================================================================
--- it/reference/misc/functions/highlight-file.xml
+++ it/reference/misc/functions/highlight-file.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 330680 Maintainer: Federico Reghenzani Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.highlight-file" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>highlight_file</refname>
+ <refpurpose>Evidenziatore di sintassi per file.</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>mixed</type><methodname>highlight_file</methodname>
+
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
+ <methodparam
choice="opt"><type>bool</type><parameter>return</parameter><initializer>false</initializer></methodparam>
+ </methodsynopsis>
+ <para>
+ Stampa o ritorna la sintassi evidenziata del codice contenuto nel file
+ di nome <parameter>filename</parameter> usando i colori predefiniti
+ nel syntax highlighter per PHP.
+ </para>
+ <para>
+ Molti server sono configurati per evidenziare i file automaticamente
+ con l'estensione <emphasis>phps</emphasis>. Per esempio,
+ <filename>example.phps</filename> mostrerà la sintassi evidenziata
+ del file. Per abilitarlo aggiungi queste righe all'&httpd.conf; (su webserver Apache):
+ </para>
+ <screen>
+<![CDATA[
+AddType application/x-httpd-php-source .phps
+]]>
+ </screen>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>filename</parameter></term>
+ <listitem>
+ <para>
+ Percorso del file PHP che deve essere evidenziato.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>return</parameter></term>
+ <listitem>
+ <para>
+ Se settata a &true; la funzione ritornerà il codice evidenziato anziché stamparlo.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Se <parameter>return</parameter> è &true;, ritorna il codice evidenziato,
altrimenti
+ &true; in caso di successo o &false; in caso di fallimento.
+ </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>4.2.1</entry>
+ <entry>
+ Questa funzione dipende ora da <link
+ linkend="ini.safe-mode">safe_mode</link> e <link
+ linkend="ini.open-basedir">open_basedir</link>.
+ </entry>
+ </row>
+ <row>
+ <entry>4.2.0</entry>
+ <entry>
+ Il parametro <parameter>return</parameter> è stato aggiunto.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <caution>
+ <para>
+ Prestare attenzione quando si usa <function>highlight_file</function>
+ a non rivelare nessun dato sensibile come password o altri tipi di informazioni
+ che possano causare problemi di sicurezza.
+ </para>
+ </caution>
+ ¬e.uses-ob;
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>highlight_string</function></member>
+ <member><link linkend="ini.syntax-highlighting">Evidenziare direttive
INI</link></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52820
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52820
------------------------------------------------------------------
New file: it/reference/misc/functions/highlight-string.xml
By: Federico Reghenzani on 2014-03-11 03:48:41
===================================================================
--- it/reference/misc/functions/highlight-string.xml
+++ it/reference/misc/functions/highlight-string.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 332597 Maintainer: Federico Reghenzani Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.highlight-string" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>highlight_string</refname>
+ <refpurpose>Evidenziatore di sintassi per stringhe</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>mixed</type><methodname>highlight_string</methodname>
+
<methodparam><type>string</type><parameter>str</parameter></methodparam>
+ <methodparam
choice="opt"><type>bool</type><parameter>return</parameter><initializer>false</initializer></methodparam>
+ </methodsynopsis>
+ <simpara>
+ Stampa o ritorna la sintassi evidenziata del codice contenuto nella stringa
+ <parameter>str</parameter> usando i colori predefiniti nel syntax highlighter per
PHP.
+ </simpara>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>str</parameter></term>
+ <listitem>
+ <para>
+ Il codice PHP che deve essere evidenziato. Questo deve includere il tag di apertura.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>return</parameter></term>
+ <listitem>
+ <para>
+ Se settata a &true; la funzione ritornerà il codice evidenziato anziché stamparlo.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Se <parameter>return</parameter> è &true;, ritorna il codice evidenziato,
altrimenti
+ &true; in caso di successo o &false; in caso di fallimento.
+ </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>4.2.0</entry>
+ <entry>
+ Il parametro <parameter>return</parameter> è stato aggiunto.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Esempio di <function>highlight_string</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+highlight_string('<?php phpinfo(); ?>');
+?>
+]]>
+ </programlisting>
+ <para>
+ L'esempio sopra stamperà (in PHP 4):
+ </para>
+ <screen>
+<![CDATA[
+<code><font color="#000000">
+<font color="#0000BB"><?php phpinfo</font><font
color="#007700">(); </font><font
color="#0000BB">?></font>
+</font>
+</code>
+]]>
+ </screen>
+ <para>
+ L'esempio sopra stamperà (in PHP 5):
+ </para>
+ <screen>
+<![CDATA[
+<code><span style="color: #000000">
+<span style="color: #0000BB"><?php phpinfo</span><span
style="color: #007700">(); </span><span style="color:
#0000BB">?></span>
+</span>
+</code>
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ ¬e.uses-ob;
+ <para>
+ Il markup HTML può essere soggetto a cambiamenti.
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>highlight_file</function></member>
+ <member><link linkend="ini.syntax-highlighting">Evidenziare direttive
INI</link></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52821
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52821
------------------------------------------------------------------
New file: it/reference/misc/functions/halt-compiler.xml
By: Federico Reghenzani on 2014-03-11 03:54:17
===================================================================
--- it/reference/misc/functions/halt-compiler.xml
+++ it/reference/misc/functions/halt-compiler.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 297028 Maintainer: Federico Reghenzani Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.halt-compiler" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>__halt_compiler</refname>
+ <refpurpose>
+ Blocca l'esecuzione del compilatore.
+ </refpurpose>
+ </refnamediv>
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>void</type><methodname>__halt_compiler</methodname>
+ <void/>
+ </methodsynopsis>
+ <para>
+ Blocca l'esecuzione del compilatore. Può essere utile per inserire dati
+ negli script PHP.
+ </para>
+ <para>
+ La posizione in byte iniziale dei dati può essere determinata dalla costante
+ <constant>__COMPILER_HALT_OFFSET__</constant> che viene definita solo se è invocata
+ la funzione <function>__halt_compiler</function> nel file.
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &return.void;
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Esempio <function>__halt_compiler</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+// open this file
+$fp = fopen(__FILE__, 'r');
+
+// seek file pointer to data
+fseek($fp, __COMPILER_HALT_OFFSET__);
+
+// and output it
+var_dump(stream_get_contents($fp));
+
+// the end of the script execution
+__halt_compiler(); the installation data (eg. tar, gz, PHP, etc.)
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <note>
+ <para>
+ <function>__halt_compiler</function> può essere usata solo dallo scope principale.
+ </para>
+ </note>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52822
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52822
------------------------------------------------------------------
Modified: it/reference/errorfunc/functions/set-error-handler.xml
By: Federico Reghenzani on 2014-03-07 06:49:55
===================================================================
--- it/reference/errorfunc/functions/set-error-handler.xml
+++ it/reference/errorfunc/functions/set-error-handler.xml
@@ -10,29 +10,209 @@
Configura una funzione di gestione dell'errore definita dall'utente.
</refpurpose>
</refnamediv>
- <refsect1>
- <title>Descrizione</title>
- <methodsynopsis>
- <type>string</type><methodname>set_error_handler</methodname>
-
<methodparam><type>string</type><parameter>error_handler</parameter></methodparam>
- </methodsynopsis>
- <para>
- Configura una funzione utente (<parameter>error_handler</parameter> per
- gestire gli errori in uno script. Restituisce, se esistente, il precedente
- gestore degli errori, o &false; in caso di errore. Questa funzione può
- essere utilizzata per definire un sistema personalizzato di gestione degli
- errori durante l'esecuzione, per esempio in applicazioni dove sia
- necessario svuotare dati o file in caso di un determinato errore
- critico, o quando sia necessario, in determinate condizioni, attivare
- un errore (con <function>trigger_error</function>)
- </para>
- <para>
- La funzione utente richiede 2 parametri: il codice errore e una stringa
- descrittiva dell'errore. Da PHP 4.0.2, è possibile opzionalmente fornire
- altri 3 parametri aggiuntivi: il nome del file, il numero di riga e il
- contesto dove è avvenuto l'errore (un array che punto alla tabella
- dei simboli attiva nel punto in cui è avvenuto l'errore).
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>mixed</type><methodname>set_error_handler</methodname>
+
<methodparam><type>callable</type><parameter>error_handler</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>error_types</parameter><initializer>E_ALL
| E_STRICT</initializer></methodparam>
+ </methodsynopsis>
+ <para>
+ Configura una funzione utente (<parameter>error_handler</parameter>) per
+ gestire gli errori in uno script.
+ </para>
+ <para>
+ Questa funzione può essere utilizzata per definire un sistema
+ personalizzato di gestione degli errori durante l'esecuzione, per esempio
+ in applicazioni dove sia necessario svuotare dati o file in caso di un
+ determinato errore critico, o quando sia necessario, in determinate
+ condizioni, attivare un errore (con <function>trigger_error</function>)
+ </para>
+ <para>
+ E' importante ricordare che il gestore degli errori standard di PHP viene
+ completamente saltato. La configurazione di <link
linkend="ini.error-reporting">error_reporting</link>
+ non avrà effetto e il vostro gestore di errore sarà richiamato senza considerarla - in ogni
+ caso sarà possibile leggere il valore corrente di
<function>error_reporting</function>
+ ed agire di conseguenza. E' di particolare rilevanza il fatto che questo
+ valore sarà 0 se la riga che causa l'errore viene precedura dall'
+ <link linkend="language.operators.errorcontrol">operatore di controllo errore
@</link>.
+ </para>
+ <para>
+ Notare anche che è vostra responsabilità definire <function>die</function>
+ se necessario. Se la funzione di gestione dell'errore ritorna, lo script
+ continerà l'esecuzione con la riga seguente a quella che ha causato
+ l'errore.
+ </para>
+ <para>
+ Il seguenti tipi di errori non saranno gestiti dalla funzione definita dall'utente:
+ <constant>E_ERROR</constant>, <constant>E_PARSE</constant>,
+ <constant>E_CORE_ERROR</constant>,
<constant>E_CORE_WARNING</constant>,
+ <constant>E_COMPILE_ERROR</constant>,
+ <constant>E_COMPILE_WARNING</constant>, e buona parte degli
+ <constant>E_STRICT</constant>.
+ </para>
+ <para>
+ Gli errori che occorrono prima che lo script sia in esecuzione (ad esempio
+ durante l'upload di file) la funzione definita dell'utente non può essere
+ chiamata perché non sarebbe ancora stata registrata.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>error_handler</parameter></term>
+ <listitem>
+ <para>
+ Una funzione di callback con la seguente struttura oppure &null; per
+ ripristinare il gestore di default.
+ </para>
+ <para>
+ <methodsynopsis>
+
<type>bool</type><methodname><replaceable>handler</replaceable></methodname>
+
<methodparam><type>int</type><parameter>errno</parameter></methodparam>
+
<methodparam><type>string</type><parameter>errstr</parameter></methodparam>
+ <methodparam
choice="opt"><type>string</type><parameter>errfile</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>errline</parameter></methodparam>
+ <methodparam
choice="opt"><type>array</type><parameter>errcontext</parameter></methodparam>
+ </methodsynopsis>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>errno</parameter></term>
+ <listitem>
+ <simpara>
+ Il primo parametro, <parameter>errno</parameter>, contiene il livello
+ dell'errore come un intero.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>errstr</parameter></term>
+ <listitem>
+ <simpara>
+ Il secondo parametro, <parameter>errstr</parameter>, contiene il messaggio
+ di errore come stringa.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>errfile</parameter></term>
+ <listitem>
+ <simpara>
+ Il terzo parametro opzionale, <parameter>errfile</parameter>,
+ contiene il nome del file che ha generato l'errore, come stringa.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>errline</parameter></term>
+ <listitem>
+ <simpara>
+ Il quarto parametro opzionale, <parameter>errline</parameter>,
+ Contiene il numero di riga relativo al file che ha generato l'errore, come
intero.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>errcontext</parameter></term>
+ <listitem>
+ <simpara>
+ Il quinto parametro opzionale, <parameter>errcontext</parameter>,
+ che e' un array che punta alla tabella simboli al punto dove l'errore è
+ stato generato. In altre parole <parameter>errcontext</parameter>
conterrà un vettore di tutte le variabili
+ che esistono e sono visibili dove l'errore è avvenuto.
+ La funzione utente non dovrebbe mai modificare
<parameter>errcontext</parameter>.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <para>
+ Se la funzione ritorna &false; allora viene eseguito il normale gestore degli errori.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>error_types</parameter></term>
+ <listitem>
+ <para>
+ Può essere usato per mascherare alcuni errori, allo stesso modo
+ di <link linkend="ini.error-reporting">error_reporting</link> che
controlla
+ quali errori mostrare. Se non viene specificato
+ <parameter>error_handler</parameter> rispecchierà le impostazioni di <link
+ linkend="ini.error-reporting">error_reporting</link>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</para>
+ </refsect1>
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Ritorna una stringa contenente l'eventuale precedente funzione degli errori.
+ Ritorna &null; se <parameter>error_handler</parameter> è &null; o in caso
di errore
+ (come un'invalida funzione di callback). Se il gestore precedente era un metodo di
+ classe, allora il valore ritornato sarà un array con due elementi: nome della classe
+ e nome del metodo.
+ </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.5.0</entry>
+ <entry>
+ <parameter>error_handler</parameter> ora accetta &null;.
+ </entry>
+ </row>
+ <row>
+ <entry>5.2.0</entry>
+ <entry>
+ <parameter>error_handler</parameter> deve ritornare &false; per
+ popolare <varname>$php_errormsg</varname>.
+ </entry>
+ </row>
+ <row>
+ <entry>5.0.0</entry>
+ <entry>
+ Il parametro <parameter>error_types</parameter> viene introdotto.
+ </entry>
+ </row>
+ <row>
+ <entry>4.3.0</entry>
+ <entry>
+ Al posto del nome della funzione, un vettore contenente il riferimento
+ all'oggetto e al nome del metodo può essere utilizzato in
+ <parameter>error_handler</parameter>.
+ </entry>
+ </row>
+ <row>
+ <entry>4.0.2</entry>
+ <entry>
+ Sono aggiunti tre parametri opzioni a <parameter>error_handler</parameter>:
+ nome del file, numero di riga e contesto.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
<para>
L'esempio sottostante mostra la gestione
delle eccezioni interne attivando gli errori e gestendoli tramite
@@ -159,28 +339,22 @@
</programlisting>
</informalexample>
</para>
- <para>
- E' importante ricordare che il gestore degli errori standard di PHP viene
- completamente saltato. La configurazione di <function>error_reporting</function>
non avrà effetto
- e il vostro gestore di errore sarà richiamato senza considerarla - in ogni
- caso sarà possibile leggere il valore corrente di
<function>error_reporting</function>
- ed agire di conseguenza. E' di particolare rilevanza il fatto che questo
- valore sarà 0 se la riga che causa l'errore viene precedura dall'
- <link linkend="language.operators.errorcontrol">operatore di controllo errore
@</link>.
- </para>
- <para>
- Notare anche che è vostra responsabilità definire <function>die</function>
- se necessario. Se la funzione di gestione dell'errore ritorna, lo script
- continerà l'esecuzione con la riga seguente a quella che ha causato
- l'errore.
- </para>
- <para>
- Vedere anche <function>error_reporting</function>,
- <function>restore_error_handler</function>,
- <function>trigger_error</function>, <function>user_error</function>
- </para>
</refsect1>
- </refentry>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><classname>ErrorException</classname></member>
+ <member><function>error_reporting</function></member>
+ <member><function>restore_error_handler</function></member>
+ <member><function>trigger_error</function></member>
+ <member><link linkend="errorfunc.constants">error level
constants</link></member>
+ <member>&seealso.callback;</member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
<!-- Keep this comment at the end of the file
Local variables:
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=52756
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=52756
------------------------------------------------------------------
--
https://edit.php.net/
This email is send automatically by the Php Docbook Online Editor.