Skip to content
Merged
Changes from all commits
Commits
Show all changes
30 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
908c02a
review by Renato Pastore
ManueldG Mar 24, 2025
2724708
Merge branch 'master' into errorfunc
ManueldG Apr 5, 2025
78e8bc4
Text arranged as demanded
ManueldG Apr 30, 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
153 changes: 101 additions & 52 deletions reference/errorfunc/functions/debug-backtrace.xml
Original file line number Diff line number Diff line change
@@ -1,43 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 201dc3748c7a94e788d470c697f017d2149c6736 Maintainer: cucinato Status: ready -->
<!-- EN-Revision: e203b12d7964aa7c729e1f7c26fcbf357fc9fb63 Maintainer: ManueldG Status: ready -->
<!-- Reviewed: no -->
<!-- CREDITS: cucinato -->
<refentry xml:id="function.debug-backtrace" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>debug_backtrace</refname>
<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 backtrace di PHP.
</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>Opzioni di <function>debug_backtrace</function></title>
<tgroup cols="2">
<tbody>
<row>
<entry>DEBUG_BACKTRACE_PROVIDE_OBJECT</entry>
<entry>
Indica se popolare o meno l'"oggetto" 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 possibili combinazioni:
<table>
<title>Opzioni di <function>debug_backtrace</function></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'indice di <literal>"object"</literal> e popola l'indice di <literal>"args"</literal>.
</entry>
</row>
<row>
<entry><code>debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)</code></entry>
<entry morerows="1" valign="middle">
Omette l'indice <literal>"object"</literal> <emphasis> e </emphasis> l'indice di <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'indice <literal>"object"</literal> <emphasis> e </emphasis> omette l'indice <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>. Gli elementi che possono essere restituiti
sono elencati nella seguente tabella:
</para>
<para>
<table>
Expand All @@ -61,7 +141,7 @@
</row>
<row>
<entry>line</entry>
<entry><type>integer</type></entry>
<entry><type>int</type></entry>
<entry>
Il numero della linea corrente. Vedere anche
<link linkend="language.constants.predefined">__LINE__</link>.
Expand All @@ -79,7 +159,7 @@
<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. Vedere anche
<link linkend="language.constants.predefined">__CLASS__</link>
</entry>
</row>
Expand All @@ -94,16 +174,16 @@
<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 ad un metodo statico, viene restituito "::". 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.
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.
</entry>
</row>
</tbody>
Expand All @@ -112,41 +192,11 @@
</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.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.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>debug_backtrace</function> example</title>
<title>Esempio di <function>debug_backtrace</function></title>
<programlisting role="php">
<![CDATA[
<?php
Expand All @@ -168,8 +218,8 @@ include_once '/tmp/a.php';
]]>
</programlisting>
<para>
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 +251,7 @@ array(4) {
</example>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand All @@ -212,7 +262,6 @@ array(4) {
</para>
</refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down