Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated reference/errorfunc/functions/debug-backtrace.xml #69

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0d03e4f
update files in appendices
ManueldG Feb 6, 2025
d67f504
ok
ManueldG Feb 6, 2025
093f5d7
Merge branch 'master' of https://github.com/ManueldG/doc-it
ManueldG Feb 6, 2025
1cc294d
array-change-key-case.xml
ManueldG Feb 6, 2025
04890b9
array-chunk.xml updated
ManueldG Feb 6, 2025
c15de1b
add mod.log
ManueldG Feb 8, 2025
50d7e7c
reset
ManueldG Feb 8, 2025
f0037d4
reset
ManueldG Feb 8, 2025
a692900
updated debug-backtrace.xml
ManueldG Feb 8, 2025
4c00518
Merge branch 'php:master' into master
ManueldG Feb 10, 2025
90a1ba1
Update pattern.modifiers.xml
ManueldG Feb 10, 2025
d35ffd5
Merge remote-tracking branch 'origin/master' into errorfunc
ManueldG Feb 10, 2025
c27a76a
Update exceptions.xml
ManueldG Feb 12, 2025
01a4ce4
Update exceptions.xml
ManueldG Feb 12, 2025
7799d9e
create a new branch from the master and merging it with errorFunc
ManueldG Feb 13, 2025
12739c5
Mod
ManueldG Feb 13, 2025
3fce132
Merge branch 'master' of https://github.com/ManueldG/doc-it
ManueldG Feb 13, 2025
3fa438c
Merge branch 'errorfunc' into fixingErrorFunc
ManueldG Feb 13, 2025
cd628cf
Merge branch 'fixingErrorFunc' into errorfunc
ManueldG Feb 13, 2025
add97ea
restored files from upstream/master
ManueldG Feb 13, 2025
0f1ba3b
unify files from master
ManueldG Feb 13, 2025
4543f10
Merge branch 'fixing-error-func' into errorfunc
ManueldG Feb 13, 2025
f0d3fe1
proposed changes
ManueldG Feb 13, 2025
2a70248
proposed changes
ManueldG Feb 13, 2025
937a24f
Merge branch 'errorfunc' of https://github.com/ManueldG/doc-it into e…
ManueldG Feb 15, 2025
274c104
corrections from Davide Pastore
ManueldG Feb 19, 2025
32db29c
added Reviewed note and one fix
ManueldG Feb 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 109 additions & 56 deletions reference/errorfunc/functions/debug-backtrace.xml
Original file line number Diff line number Diff line change
@@ -1,47 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 201dc3748c7a94e788d470c697f017d2149c6736 Maintainer: cucinato Status: ready -->
<!-- EN-Revision: e203b12d7964aa7c729e1f7c26fcbf357fc9fb63 Maintainer: Manuel deG Status: ready -->
<refentry xml:id="function.debug-backtrace" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>debug_backtrace</refname>
<refpurpose>Genera un backtrace</refpurpose>
<refpurpose>Genera un backtrace </refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>debug_backtrace</methodname>
<methodparam choice="opt"><type>bool</type><parameter>provide_object</parameter><initializer>true</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer><constant>DEBUG_BACKTRACE_PROVIDE_OBJECT</constant></initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>limit</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
<function>debug_backtrace</function> genera un backtrace PHP.
<function>debug_backtrace</function> genera un PHP backtrace.
</para>
</refsect1>

</refsect1>
<refsect1 role="parameters"><!-- {{{ -->
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>provide_object</parameter></term>
<term><parameter>options</parameter></term>
<listitem>
<para>
Questo parametro è una bitmask per le seguenti opzioni:
<table>
<title><function>debug_backtrace</function> options</title>
<tgroup cols="2">
<tbody>
<row>
<entry>DEBUG_BACKTRACE_PROVIDE_OBJECT</entry>
<entry>
Indica se popolare o meno l'"oggetto" index.
Whether or not to populate the "object" index.
</entry>
</row>
<row>
<entry>DEBUG_BACKTRACE_IGNORE_ARGS</entry>
<entry>
Indica se omettere o meno gli indici di "args" e quindi tutti gli argomenti
della funzione/metodo, per risparmiare memoria.
</entry>
</row>
</tbody>
</tgroup>
</table>
<note>
<para>
Ci sono quattro possibilità:
<table>
<title><function>debug_backtrace</function> options</title>
<tgroup cols="2">
<tbody>
<row>
<entry><code>debug_backtrace()</code></entry>
<entry morerows="2" valign="middle">
Popola entrambi gli indici
</entry>
</row>
<row>
<entry><code>debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT)</code></entry>
</row>
<row>
<entry><code>debug_backtrace(1)</code></entry>
</row>
<row>
<entry><code>debug_backtrace(0)</code></entry>
<entry valign="middle">
Omette l'index <literal>"object"</literal> e popola l'index <literal>"args"</literal>.
</entry>
</row>
<row>
<entry><code>debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)</code></entry>
<entry morerows="1" valign="middle">
Omits index <literal>"object"</literal> <emphasis>and</emphasis> index <literal>"args"</literal>.
</entry>
</row>
<row>
<entry><code>debug_backtrace(2)</code></entry>
</row>
<row>
<entry><code>debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT|DEBUG_BACKTRACE_IGNORE_ARGS)</code></entry>
<entry morerows="1" valign="middle">
Popola l'index <literal>"object"</literal> <emphasis> e </emphasis> omette l'index <literal>"args"</literal>.
</entry>
</row>
<row>
<entry><code>debug_backtrace(3)</code></entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</note>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>limit</parameter></term>
<listitem>
<para>
Abilita o meno la popolazione dell'indice "object".
Questo parametro può essere utilizzato per limitare il numero di stack frame restituiti.
Per default (<parameter>limit</parameter>=<literal>0</literal>) restituisce tutti gli stack frame.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1><!-- }}} -->

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Restituisce un <type>array</type> associativo. Gli elementi che possono essere restituiti
sono elencati nella seguente tabella:
Restituisce un array associativo <type>array</type>. I possibili elementi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restituisce un array di array associativi. I possibili elementi restituiti

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ho trovato una traduzione più carina
Restituisce una matrice di array associativi. i possibili elementi forniti

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Come mai una matrice di array associativi?

ritornati sono i seguenti:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

senza ritornati (perchè già incluso nella riga precedente, come da file inglese).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restituiti ad ogni modo va incluso nella riga precedente.

</para>
<para>
<table>
<title>Elementi restituibili dalla funzione <function>debug_backtrace</function></title>
<title>I possibili elementi ritornati sono: <function>debug_backtrace</function></title>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meglio usare:

Possibili elementi restituiti da <function>debug_backtrace</function>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puoi rimuovere i due punti?

<tgroup cols="3">
<thead>
<row>
Expand All @@ -55,31 +134,31 @@
<entry>function</entry>
<entry><type>string</type></entry>
<entry>
Il nome della funzione corrente. Vedere anche
Il nome della funzione corrente. Vedi anche
<link linkend="language.constants.predefined">__FUNCTION__</link>.
</entry>
</row>
<row>
<entry>line</entry>
<entry><type>integer</type></entry>
<entry><type>int</type></entry>
<entry>
Il numero della linea corrente. Vedere anche
Il numero della linea corrente. Vedi anche
<link linkend="language.constants.predefined">__LINE__</link>.
</entry>
</row>
<row>
<entry>file</entry>
<entry><type>string</type></entry>
<entry>
Il nome del file corrente. Vedere anche
Il nome del file corrente. Vedi anche
<link linkend="language.constants.predefined">__FILE__</link>.
</entry>
</row>
<row>
<entry>class</entry>
<entry><type>string</type></entry>
<entry>
Il nome della <link linkend="language.oop5">class</link> corrente. Vedere anche
Il nome della <link linkend="language.oop5">classe</link> corrente name. Vedi anche
<link linkend="language.constants.predefined">__CLASS__</link>
</entry>
</row>
Expand All @@ -94,59 +173,33 @@
<entry>type</entry>
<entry><type>string</type></entry>
<entry>
Il tipo di chiamata corrente. Se chiamata di metodo, viene restituito "->" is returned. Se chiamata
di metodo statico, viene restituito "::". Se chiamata di funzione, non viene restituito niente.
Il tipo di chiamata corrente. Se è una chiamata ad un metodo, viene restituito
"-&gt;". Se è una chiamata al metodo statica, viene restituito "::".
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se è una chiamata ad un metodo statico. Inoltre, queste tre righe devono diventare due, rispettando quelle del file in inglese.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dici cosi?

Copy link
Collaborator

@DavidePastore DavidePastore Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Va bene per il numero di righe, ma cerca di rispettare anche il contenuto con la versione inglese corrispondente:

image

Io per esempio metterei Se è una chiamata ad nella prima riga ed il resto nella seconda.

Se è una chiamata ad una funzione, non viene restituito nulla.
</entry>
</row>
<row>
<entry>args</entry>
<entry><type>array</type></entry>
<entry>
Se all'interno di una funzione, elenca gli argomenti della funzione.
Se all'interno di un file incluso, elenca i nomi del file incluso.
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</refsect1>
Se dentro una funzione, elenca una lista con gli argomenti della funzione,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Punto alla fine invece della virgola, il "Se" va alla fine di questa riga.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dici così?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intendevo questo:

        Se dentro una funzione, elenca una lista con gli argomenti della funzione.  Se
        all'interno di un file che è stato incluso, elenca i nomi dei file inclusi.

se all'interno di un file che è stato incluso, elenca i nomi dei file inclusi.

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.2.5</entry>
<entry>
Aggiunto il parametro opzionale <parameter>provide_object</parameter>.
</entry>
</row>
<row>
<entry>5.1.1</entry>
<entry>
Aggiunto l'<type>object</type> corrente come possibile elemento di ritorno.
Se all'interno di una funzione, elenca gli argomenti della funzione. Se all'interno
di un file incluso, elenca i nomi dei file inclusi.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</table>
</para>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>debug_backtrace</function> example</title>
<title><function>debug_backtrace</function> esempio</title>
<programlisting role="php">
<![CDATA[
<?php
Expand All @@ -168,8 +221,8 @@ include_once '/tmp/a.php';
]]>
</programlisting>
<para>
Dà risultati simili ai seguenti quando si esegue
<filename>/tmp/b.php</filename>:
Fornisce Risultati simili al seguente esempio quando si esegue
<filename>/tmp/b.php</filename>:
</para>
<screen>
<![CDATA[
Expand Down Expand Up @@ -201,7 +254,7 @@ array(4) {
</example>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down