/html/docs/include/features.php
PHP | 1414 lines | 1400 code | 12 blank | 2 comment | 3 complexity | e5224c4eab9eb1948c7850a35ef80fcb MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- <?php
- $features = array(
- 'all_functions' => array(
- 'All Functions',
- FUNC_ALL,
- 'This section describes all available functions available in Xdebug.',
- ''
- ),
- 'all_settings' => array(
- 'All Settings',
- FUNC_ALL,
- 'This section describes all available configuration settings available in Xdebug.',
- ''
- ),
- 'all' => array(
- 'The full documentation',
- FUNC_ALL,
- '',
- ''
- ),
- 'install' => array(
- 'Installation',
- FUNC_INSTALL,
- 'This section describes on how to install Xdebug.',
- "
- <h2>Precompiled Windows Modules</h2>
- <p>
- There are a few precompiled modules for Windows, they are all for the non-debug
- version of PHP. You can get those at the <a href='/download.php'>download</a>
- page. Follow <a href='/wizard.php'>these instructions</a> to get Xdebug
- installed.
- </p>
- <a name='pecl'></a>
- <h2>PECL Installation</h2>
- <p>
- As of Xdebug 0.9.0 you can install Xdebug through PEAR/PECL. This only works
- with with PEAR version 0.9.1-dev or higher and some UNIX.
- </p>
- <p>
- Installing with PEAR/PECL is as easy as:
- </p>
- <pre>
- # pecl install xdebug
- </pre>
- <p>
- but you still need to add the correct line to your php.ini: (don't forget to
- change the path and filename to the correct one — but make sure you use
- the <b>full path</b>)
- </p>
- <pre>
- zend_extension=\"/usr/local/php/modules/xdebug.so\"
- </pre>
- <p><b>Note:</b> You should ignore any prompts to add \"extension=xdebug.so\" to
- php.ini — this <b>will</b> cause problems.</p>
- <a name='source'></a>
- <h2>Installation From Source</h2>
- <p>
- You can <a href='/download.php#releases'>download</a> the source of the latest <b>stable</b> release [KW:last_release_version].
- Alternatively you can obtain Xdebug from GIT:
- </p>
- <pre>
- git clone git://github.com/xdebug/xdebug.git
- </pre>
- <p>
- This will checkout the latest development version which is currently [KW:last_dev_version].
- You can also browse the source at <a href='https://github.com/derickr/xdebug'>https://github.com/derickr/xdebug</a>.
- </p>
- <a name='compile'></a>
- <h2>Compiling</h2>
- <p>There is a <a href='/wizard.php'>wizard</a> available that provides you
- with the correct file to download, and which paths to use.</p>
- <p>
- You compile Xdebug separately from the rest of PHP. Note, however,
- that you need access to the scripts 'phpize' and 'php-config'. If
- your system does not have 'phpize' and 'php-config', you will need to
- compile and install PHP from a source tarball first, as these script
- are by-products of the PHP compilation and installation processes. (Debian users
- can install the required tools with
- <code>apt-get install php5-dev</code>). It is important that the source version
- matches the installed version as there are slight, but important, differences
- between PHP versions. Once you have access to 'phpize' and
- 'php-config', do the following:
- </p>
- <p>
- <ol>
- <li>Unpack the tarball: tar -xzf xdebug-[KW:last_release_version].tgz. Note that you do
- not need to unpack the tarball inside the PHP source code tree.
- Xdebug is compiled separately, all by itself, as stated above.</li>
- <li>cd xdebug-[KW:last_release_version]</li>
- <li>Run phpize: phpize (or /path/to/phpize if phpize is not in your path). Make
- sure you use the phpize that belongs to the PHP version that you want to use
- Xdebug with. See this <a href='/docs/faq#api'>FAQ entry</a> if
- you're having some issues with finding which phpize to use.</li>
- <li>./configure --enable-xdebug
- <li>make</li>
- <li>make install</li>
- </ol>
- <a name='configure-php'></a>
- <h2>Configure PHP to Use Xdebug</h2>
- <ol>
- <li>add the following line to php.ini:
- zend_extension=\"/wherever/you/put/it/xdebug.so\" (for non-threaded use of PHP,
- for example the CLI, CGI or Apache 1.3 module) or:
- zend_extension_ts=\"/wherever/you/put/it/xdebug.so\" (for threaded usage of PHP,
- for example the Apache 2 work MPM or the the ISAPI module).
- <strong>Note:</strong> In case you compiled PHP yourself and used
- --enable-debug you would have to use zend_extension_debug=.
- <strong>From PHP 5.3 onwards, you always need to use the zend_extension PHP.ini
- setting name, and not zend_extension_ts, nor zend_extension_debug. However,
- your compile options (ZTS/normal build; debug/non-debug) still need to match
- with what PHP is using.</strong>
- </li>
- <li>Restart your webserver.</li>
- <li>Write a PHP page that calls '<i>phpinfo()</i>' Load it in a browser and
- look for the info on the Xdebug module. If you see it next to the Zend logo,
- you have been successful! You can also use 'php -m' if you have a command
- line version of PHP, it lists all loaded modules. Xdebug should appear
- twice there (once under 'PHP Modules' and once under 'Zend Modules').</li>
- </ol>
- </p>
- <a name='compat'></a>
- <h2>Compatibility</h2>
- <p>
- Xdebug does not work together with the Zend Optimizer or any other extension
- that deals with PHP's internals (DBG, APD, ioncube etc). This is due to
- compatibility problems with those modules.
- </p>
- <a name='debugclient'></a>
- <h2>Debugclient Installation</h2>
- <p>
- Unpack the Xdebug source tarball and issue the following commands:
- </p>
- <pre class='example'>
- $ cd debugclient
- $ ./configure --with-libedit
- $ make
- # make install
- </pre>
- <p>
- This will install the debugclient binary in /usr/local/bin unless you don't
- have libedit installed on your system. You can either install it, or leave
- out the '--with-libedit' option to configure. Debian 'unstable' users can
- install the library with <code>apt-get install libedit-dev libedit2</code>.
- </p>
- <p>
- If the configure script can not find libedit and you are sure you have (and
- it's headers) installed correctly and you get link errors like the
- following in your configure.log:
- </p>
- <pre class='example'>
- /usr/lib64/libedit.so: undefined reference to `tgetnum'
- /usr/lib64/libedit.so: undefined reference to `tgoto'
- /usr/lib64/libedit.so: undefined reference to `tgetflag'
- /usr/lib64/libedit.so: undefined reference to `tputs'
- /usr/lib64/libedit.so: undefined reference to `tgetent'
- /usr/lib64/libedit.so: undefined reference to `tgetstr'
- collect2: ld returned 1 exit status
- </pre>
- <p>
- you need to change your configure command to:
- </p>
- <pre class='example'>
- $ LDFLAGS=-lncurses ./configure --with-libedit
- </pre>"
- ),
- 'basic' => array(
- 'Basic Features',
- FUNC_BASIC,
- 'Xdebug\'s basic functions include the display of stack traces on error
- conditions, maximum nesting level protection and time tracking.',
- ""
- ),
- 'display' => array(
- 'Variable Display Features',
- FUNC_VAR_DUMP,
- 'Xdebug replaces PHP\'s var_dump() function for displaying variables.
- Xdebug\'s version includes different colors for different types and
- places limits on the amount of array elements/object properties,
- maximum depth and string lengths. There are a few other functions
- dealing with variable display as well.',
- '
- <h2>Effect of settings on var_dump()</h2>
- <p>
- There is a number of settings that control the output of Xdebug\'s modified
- [FUNC:var_dump] function: [CFG:var_display_max_children],
- [CFG:var_display_max_data]
- and [CFG:var_display_max_depth]. The effect of these three settings is best
- shown with an example. The script below is run four time, each time with
- different settings. You can use the tabs to see the difference.
- </p>
- <h3>The script</h3>
- <div class="example">
- <p>
- <code><span style="color: #000000">
- <span style="color: #0000BB"><?php<br /></span><span style="color: #007700">class </span><span style="color: #0000BB">test </span><span style="color: #007700">{<br /> public </span><span style="color: #0000BB">$pub </span><span style="color: #007700">= </span><span style="color: #0000BB">false</span><span style="color: #007700">;<br /> private </span><span style="color: #0000BB">$priv </span><span style="color: #007700">= </span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /> protected </span><span style="color: #0000BB">$prot </span><span style="color: #007700">= </span><span style="color: #0000BB">42</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">$t </span><span style="color: #007700">= new </span><span style="color: #0000BB">test</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$t</span><span style="color: #007700">-></span><span style="color: #0000BB">pub </span><span style="color: #007700">= </span><span style="color: #0000BB">$t</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$data </span><span style="color: #007700">= array(<br /> </span><span style="color: #DD0000">\'one\' </span><span style="color: #007700">=> </span><span style="color: #DD0000">\'a somewhat long string!\'</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">\'two\' </span><span style="color: #007700">=> array(<br /> </span><span style="color: #DD0000">\'two.one\' </span><span style="color: #007700">=> array(<br /> </span><span style="color: #DD0000">\'two.one.zero\' </span><span style="color: #007700">=> </span><span style="color: #0000BB">210</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">\'two.one.one\' </span><span style="color: #007700">=> array(<br /> </span><span style="color: #DD0000">\'two.one.one.zero\' </span><span style="color: #007700">=> </span><span style="color: #0000BB">3.141592564</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">\'two.one.one.one\' </span><span style="color: #007700">=> </span><span style="color: #0000BB">2.7</span><span style="color: #007700">,<br /> ),<br /> ),<br /> ),<br /> </span><span style="color: #DD0000">\'three\' </span><span style="color: #007700">=> </span><span style="color: #0000BB">$t</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">\'four\' </span><span style="color: #007700">=> </span><span style="color: #0000BB">range</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">5</span><span style="color: #007700">),<br />);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$data </span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?><br /></span>
- </span>
- </code>
- </p>
- </div>
- <h3>The results</h3>
- <div id="demosettings" class="yui-navset">
- <ul class="yui-nav">
- <li class="selected"><a href="#default"><em>default</em></a></li>
- <li><a href="#children"><em>children=2</em></a></li>
- <li><a href="#data"><em>data=16</em></a></li>
- <li><a href="#depth"><em>depth=2</em></a></li>
- <li><a href="#multiple"><em>children=3, data=8, depth=1</em></a></li>
- </ul>
- <div class="yui-content">
- <div id="default">
- <pre>
- <b>array</b>
- \'one\' <font color=\'#888a85\'>=></font> <small>string</small> <font color=\'#cc0000\'>\'a somewhat long string!\'</font> <i>(length=23)</i>
- \'two\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- \'two.one\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- \'two.one.zero\' <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>210</font>
- \'two.one.one\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- ...
- \'three\' <font color=\'#888a85\'>=></font>
- <b>object</b>(<i>test</i>)[<i>1</i>]
- <i>public</i> \'pub\' <font color=\'#888a85\'>=></font>
- <i>&</i><b>object</b>(<i>test</i>)[<i>1</i>]
- <i>private</i> \'priv\' <font color=\'#888a85\'>=></font> <small>boolean</small> <font color=\'#75507b\'>true</font>
- <i>protected</i> \'prot\' <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>42</font>
- \'four\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- 0 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>0</font>
- 1 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>1</font>
- 2 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>2</font>
- 3 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>3</font>
- 4 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>4</font>
- 5 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>5</font>
- </pre>
- </div>
- <div id="children">
- <pre>
- <b>array</b>
- \'one\' <font color=\'#888a85\'>=></font> <small>string</small> <font color=\'#cc0000\'>\'a somewhat long string!\'</font> <i>(length=23)</i>
- \'two\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- \'two.one\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- \'two.one.zero\' <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>210</font>
- \'two.one.one\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- ...
- <i>more elements...</i>
- </pre>
- </div>
- <div id="data">
- <pre>
- <b>array</b>
- \'one\' <font color=\'#888a85\'>=></font> <small>string</small> <font color=\'#cc0000\'>\'a somewhat long \'...</font> <i>(length=23)</i>
- \'two\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- \'two.one\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- \'two.one.zero\' <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>210</font>
- \'two.one.one\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- ...
- \'three\' <font color=\'#888a85\'>=></font>
- <b>object</b>(<i>test</i>)[<i>1</i>]
- <i>public</i> \'pub\' <font color=\'#888a85\'>=></font>
- <i>&</i><b>object</b>(<i>test</i>)[<i>1</i>]
- <i>private</i> \'priv\' <font color=\'#888a85\'>=></font> <small>boolean</small> <font color=\'#75507b\'>true</font>
- <i>protected</i> \'prot\' <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>42</font>
- \'four\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- 0 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>0</font>
- 1 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>1</font>
- 2 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>2</font>
- 3 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>3</font>
- 4 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>4</font>
- 5 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>5</font>
- </pre>
- </div>
- <div id="depth">
- <pre>
- <b>array</b>
- \'one\' <font color=\'#888a85\'>=></font> <small>string</small> <font color=\'#cc0000\'>\'a somewhat long string!\'</font> <i>(length=23)</i>
- \'two\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- \'two.one\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- ...
- \'three\' <font color=\'#888a85\'>=></font>
- <b>object</b>(<i>test</i>)[<i>1</i>]
- <i>public</i> \'pub\' <font color=\'#888a85\'>=></font>
- <i>&</i><b>object</b>(<i>test</i>)[<i>1</i>]
- <i>private</i> \'priv\' <font color=\'#888a85\'>=></font> <small>boolean</small> <font color=\'#75507b\'>true</font>
- <i>protected</i> \'prot\' <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>42</font>
- \'four\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- 0 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>0</font>
- 1 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>1</font>
- 2 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>2</font>
- 3 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>3</font>
- 4 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>4</font>
- 5 <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>5</font>
- </pre>
- </div>
- <div id="multiple">
- <pre>
- <b>array</b>
- \'one\' <font color=\'#888a85\'>=></font> <small>string</small> <font color=\'#cc0000\'>\'a somewh\'...</font> <i>(length=23)</i>
- \'two\' <font color=\'#888a85\'>=></font>
- <b>array</b>
- ...
- \'three\' <font color=\'#888a85\'>=></font>
- <b>object</b>(<i>test</i>)[<i>1</i>]
- ...
- <i>more elements...</i>
- </pre>
- </div>
- </div>
- </div>',
- array( 'tabfields' => array( 'demosettings' ) )
- ),
- 'stack_trace' => array(
- 'Stack Traces',
- FUNC_STACK_TRACE,
- 'When Xdebug is activated it will show a stack trace whenever PHP
- decides to show a notice, warning, error etc. The information that
- stack traces display, and the way how they are presented, can be
- configured to suit your needs.',
- '
- <p>
- The stack traces that Xdebug shows on error situations (if <a
- href="http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors">display_errors</a>
- is set to On in php.ini) are quite conservative in the amount of
- information that they show. This is because large amounts of information can
- slow down both the execution of the scripts and the rendering of the stack
- traces themselves in the browser. However, it is possible to make the stack
- traces show more detailed information with different settings.
- </p>
- <h2>Variables in Stack Traces</h2>
- <p>
- By default Xdebug will now show variable information in the stack traces that
- it produces. Variable information can take quite a bit of resources, both while
- collecting or displaying. However, in many cases it is useful that variable
- information is displayed, and that is why Xdebug has the setting
- [CFG:collect_params]. The script below, in combination with what the output
- will look like with different values of this setting is shown in the example
- below.
- </p>
- <h3>The script</h3>
- <div class="example">
- <p>
- <code><span style="color: #000000">
- <span style="color: #0000BB"><?php<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">foo</span><span style="color: #007700">( </span><span style="color: #0000BB">$a </span><span style="color: #007700">) {<br /> for (</span><span style="color: #0000BB">$i </span><span style="color: #007700">= </span><span style="color: #0000BB">1</span><span style="color: #007700">; </span><span style="color: #0000BB">$i </span><span style="color: #007700">< </span><span style="color: #0000BB">$a</span><span style="color: #007700">[</span><span style="color: #DD0000">\'foo\'</span><span style="color: #007700">]; </span><span style="color: #0000BB">$i</span><span style="color: #007700">++) {<br /> if (</span><span style="color: #0000BB">$i </span><span style="color: #007700">== </span><span style="color: #0000BB">500000</span><span style="color: #007700">) </span><span style="color: #0000BB">xdebug_break</span><span style="color: #007700">();<br /> }<br />}<br /><br /></span><span style="color: #0000BB">set_time_limit</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$c </span><span style="color: #007700">= new </span><span style="color: #0000BB">stdClass</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$c</span><span style="color: #007700">-></span><span style="color: #0000BB">bar </span><span style="color: #007700">= </span><span style="color: #0000BB">100</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$a </span><span style="color: #007700">= array(<br /> </span><span style="color: #0000BB">42 </span><span style="color: #007700">=> </span><span style="color: #0000BB">false</span><span style="color: #007700">, </span><span style="color: #DD0000">\'foo\' </span><span style="color: #007700">=> </span><span style="color: #0000BB">912124</span><span style="color: #007700">,<br /> </span><span style="color: #0000BB">$c</span><span style="color: #007700">, new </span><span style="color: #0000BB">stdClass</span><span style="color: #007700">, </span><span style="color: #0000BB">fopen</span><span style="color: #007700">( </span><span style="color: #DD0000">\'/etc/passwd\'</span><span style="color: #007700">, </span><span style="color: #DD0000">\'r\' </span><span style="color: #007700">)<br />);<br /></span><span style="color: #0000BB">foo</span><span style="color: #007700">( </span><span style="color: #0000BB">$a </span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?><br /></span>
- </span>
- </code>
- </p>
- </div>
- <h3>The results</h3>
- <p>
- Different values for the [CFG:collect_params] setting give different output,
- which you can see below:
- </p>
- <div id="collectparams" class="yui-navset">
- <ul class="yui-nav">
- <li class="selected"><a href="#default"><em>default</em></a></li>
- <li><a href="#collect-params-1"><em>1</em></a></li>
- <li><a href="#collect-params-2"><em>2</em></a></li>
- <li><a href="#collect-params-3"><em>3</em></a></li>
- <li><a href="#collect-params-4"><em>4</em></a></li>
- </ul>
- <div class="yui-content">
- <div id="default">
- <br />
- <font size=\'1\'><table border=\'1\' cellspacing=\'0\' cellpadding=\'1\'>
- <tr><th align=\'left\' bgcolor=\'#f57900\' colspan="5"><span style=\'background-color: #cc0000; color: #fce94f; font-size: x-large;\'>( ! )</span> Fatal error: Maximum execution time of 1 second exceeded in /home/httpd/html/test/xdebug/docs/stack.php on line <i>34</i></th></tr>
- <tr><th align=\'left\' bgcolor=\'#e9b96e\' colspan=\'5\'>Call Stack</th></tr>
- <tr><th align=\'center\' bgcolor=\'#eeeeec\'>#</th><th align=\'left\' bgcolor=\'#eeeeec\'>Time</th><th align=\'left\' bgcolor=\'#eeeeec\'>Memory</th><th align=\'left\' bgcolor=\'#eeeeec\'>Function</th><th align=\'left\' bgcolor=\'#eeeeec\'>Location</th></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>1</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0001</td><td bgcolor=\'#eeeeec\' align=\'right\'>58564</td><td bgcolor=\'#eeeeec\'>{main}( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>0</td></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>2</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0004</td><td bgcolor=\'#eeeeec\' align=\'right\'>62764</td><td bgcolor=\'#eeeeec\'>foo( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>47</td></tr>
- </table></font>
- </div>
- <div id="collect-params-1">
- <pre>
- ini_set(\'xdebug.collect_params\', \'1\');
- </pre>
- <br />
- <font size=\'1\'><table border=\'1\' cellspacing=\'0\' cellpadding=\'1\'>
- <tr><th align=\'left\' bgcolor=\'#f57900\' colspan="5"><span style=\'background-color: #cc0000; color: #fce94f; font-size: x-large;\'>( ! )</span> Fatal error: Maximum execution time of 1 second exceeded in /home/httpd/html/test/xdebug/docs/stack.php on line <i>31</i></th></tr>
- <tr><th align=\'left\' bgcolor=\'#e9b96e\' colspan=\'5\'>Call Stack</th></tr>
- <tr><th align=\'center\' bgcolor=\'#eeeeec\'>#</th><th align=\'left\' bgcolor=\'#eeeeec\'>Time</th><th align=\'left\' bgcolor=\'#eeeeec\'>Memory</th><th align=\'left\' bgcolor=\'#eeeeec\'>Function</th><th align=\'left\' bgcolor=\'#eeeeec\'>Location</th></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>1</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0001</td><td bgcolor=\'#eeeeec\' align=\'right\'>58132</td><td bgcolor=\'#eeeeec\'>{main}( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>0</td></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>2</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0004</td><td bgcolor=\'#eeeeec\' align=\'right\'>62380</td><td bgcolor=\'#eeeeec\'>foo( <span><font color=\'#ce5c00\'>array(5)</font></span> )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>47</td></tr>
- </table></font>
- </div>
- <div id="collect-params-2">
- <pre>
- ini_set(\'xdebug.collect_params\', \'2\');
- </pre>
- <br />
- <font size=\'1\'><table border=\'1\' cellspacing=\'0\' cellpadding=\'1\'>
- <tr><th align=\'left\' bgcolor=\'#f57900\' colspan="5"><span style=\'background-color: #cc0000; color: #fce94f; font-size: x-large;\'>( ! )</span> Fatal error: Maximum execution time of 1 second exceeded in /home/httpd/html/test/xdebug/docs/stack.php on line <i>31</i></th></tr>
- <tr><th align=\'left\' bgcolor=\'#e9b96e\' colspan=\'5\'>Call Stack</th></tr>
- <tr><th align=\'center\' bgcolor=\'#eeeeec\'>#</th><th align=\'left\' bgcolor=\'#eeeeec\'>Time</th><th align=\'left\' bgcolor=\'#eeeeec\'>Memory</th><th align=\'left\' bgcolor=\'#eeeeec\'>Function</th><th align=\'left\' bgcolor=\'#eeeeec\'>Location</th></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>1</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0001</td><td bgcolor=\'#eeeeec\' align=\'right\'>58564</td><td bgcolor=\'#eeeeec\'>{main}( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>0</td></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>2</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0004</td><td bgcolor=\'#eeeeec\' align=\'right\'>62812</td><td bgcolor=\'#eeeeec\'>foo( <span title=\'array (42 => FALSE, 'foo' => 912124, 43 => class stdClass { public $bar = 100 }, 44 => class stdClass { }, 45 => resource(2) of type (stream))\'><font color=\'#ce5c00\'>array(5)</font></span> )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>47</td></tr>
- </table></font>
- </div>
- <div id="collect-params-3">
- <pre>
- ini_set(\'xdebug.collect_params\', \'3\');
- </pre>
- <br />
- <font size=\'1\'><table border=\'1\' cellspacing=\'0\' cellpadding=\'1\'>
- <tr><th align=\'left\' bgcolor=\'#f57900\' colspan="5"><span style=\'background-color: #cc0000; color: #fce94f; font-size: x-large;\'>( ! )</span> Fatal error: Maximum execution time of 1 second exceeded in /home/httpd/html/test/xdebug/docs/stack.php on line <i>31</i></th></tr>
- <tr><th align=\'left\' bgcolor=\'#e9b96e\' colspan=\'5\'>Call Stack</th></tr>
- <tr><th align=\'center\' bgcolor=\'#eeeeec\'>#</th><th align=\'left\' bgcolor=\'#eeeeec\'>Time</th><th align=\'left\' bgcolor=\'#eeeeec\'>Memory</th><th align=\'left\' bgcolor=\'#eeeeec\'>Function</th><th align=\'left\' bgcolor=\'#eeeeec\'>Location</th></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>1</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0001</td><td bgcolor=\'#eeeeec\' align=\'right\'>58564</td><td bgcolor=\'#eeeeec\'>{main}( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>0</td></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>2</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0004</td><td bgcolor=\'#eeeeec\' align=\'right\'>62812</td><td bgcolor=\'#eeeeec\'>foo( <span>array (42 => FALSE, 'foo' => 912124, 43 => class stdClass { public $bar = 100 }, 44 => class stdClass { }, 45 => resource(2) of type (stream))</span> )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>47</td></tr>
- </table></font>
- </div>
- <div id="collect-params-4">
- <pre>
- ini_set(\'xdebug.collect_params\', \'4\');
- </pre>
- <br />
- <font size=\'1\'><table border=\'1\' cellspacing=\'0\' cellpadding=\'1\'>
- <tr><th align=\'left\' bgcolor=\'#f57900\' colspan="5"><span style=\'background-color: #cc0000; color: #fce94f; font-size: x-large;\'>( ! )</span> Fatal error: Maximum execution time of 1 second exceeded in /home/httpd/html/test/xdebug/docs/stack.php on line <i>31</i></th></tr>
- <tr><th align=\'left\' bgcolor=\'#e9b96e\' colspan=\'5\'>Call Stack</th></tr>
- <tr><th align=\'center\' bgcolor=\'#eeeeec\'>#</th><th align=\'left\' bgcolor=\'#eeeeec\'>Time</th><th align=\'left\' bgcolor=\'#eeeeec\'>Memory</th><th align=\'left\' bgcolor=\'#eeeeec\'>Function</th><th align=\'left\' bgcolor=\'#eeeeec\'>Location</th></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>1</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0001</td><td bgcolor=\'#eeeeec\' align=\'right\'>58132</td><td bgcolor=\'#eeeeec\'>{main}( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>0</td></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>2</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0004</td><td bgcolor=\'#eeeeec\' align=\'right\'>62380</td><td bgcolor=\'#eeeeec\'>foo( <span>$a = </span><span>array (42 => FALSE, 'foo' => 912124, 43 => class stdClass { public $bar = 100 }, 44 => class stdClass { }, 45 => resource(2) of type (stream))</span> )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>47</td></tr>
- </table></font>
- </div>
- </div>
- </div>
- <h2>Additional Information</h2>
- <p>
- On top of showing the values of variables that were passed to each function
- Xdebug can also optionally show information about selected superglobals by using
- the [CFG:dump_globals] and [CFG:dump.*] settings. The settings [CFG:dump_once]
- and [CFG:dump_undefined] slightly modify when and which information is shown
- from the available superglobals. With the [CFG:show_local_vars] setting you can
- instruct Xdebug to show all variables available in the top-most stack level for
- a user defined function as well. The examples below show this (the script is
- used from the example above).
- </p>
- <div id="othersettings" class="yui-navset">
- <ul class="yui-nav">
- <li class="selected"><a href="#add-default"><em>default</em></a></li>
- <li><a href="#add-superglobals"><em>dump_superglobals=1</em></a></li>
- <li><a href="#add-local-vars"><em>show_local_vars=1</em></a></li>
- </ul>
- <div class="yui-content">
- <div id="add-default">
- <br />
- <font size=\'1\'><table border=\'1\' cellspacing=\'0\' cellpadding=\'1\'>
- <tr><th align=\'left\' bgcolor=\'#f57900\' colspan="5"><span style=\'background-color: #cc0000; color: #fce94f; font-size: x-large;\'>( ! )</span> Fatal error: Maximum execution time of 1 second exceeded in /home/httpd/html/test/xdebug/docs/stack.php on line <i>34</i></th></tr>
- <tr><th align=\'left\' bgcolor=\'#e9b96e\' colspan=\'5\'>Call Stack</th></tr>
- <tr><th align=\'center\' bgcolor=\'#eeeeec\'>#</th><th align=\'left\' bgcolor=\'#eeeeec\'>Time</th><th align=\'left\' bgcolor=\'#eeeeec\'>Memory</th><th align=\'left\' bgcolor=\'#eeeeec\'>Function</th><th align=\'left\' bgcolor=\'#eeeeec\'>Location</th></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>1</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0001</td><td bgcolor=\'#eeeeec\' align=\'right\'>58564</td><td bgcolor=\'#eeeeec\'>{main}( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>0</td></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>2</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0004</td><td bgcolor=\'#eeeeec\' align=\'right\'>62764</td><td bgcolor=\'#eeeeec\'>foo( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>47</td></tr>
- </table></font>
- </div>
- <div id="add-superglobals">
- <pre>
- ini_set(\'xdebug.collect_vars\', \'on\');
- ini_set(\'xdebug.collect_params\', \'4\');
- ini_set(\'xdebug.dump_globals\', \'on\');
- ini_set(\'xdebug.dump.SERVER\', \'REQUEST_URI\');
- </pre>
- <br />
- <font size=\'1\'><table border=\'1\' cellspacing=\'0\' cellpadding=\'1\'>
- <tr><th align=\'left\' bgcolor=\'#f57900\' colspan="5"><span style=\'background-color: #cc0000; color: #fce94f; font-size: x-large;\'>( ! )</span> Fatal error: Maximum execution time of 1 second exceeded in /home/httpd/html/test/xdebug/docs/stack.php on line <i>33</i></th></tr>
- <tr><th align=\'left\' bgcolor=\'#e9b96e\' colspan=\'5\'>Call Stack</th></tr>
- <tr><th align=\'center\' bgcolor=\'#eeeeec\'>#</th><th align=\'left\' bgcolor=\'#eeeeec\'>Time</th><th align=\'left\' bgcolor=\'#eeeeec\'>Memory</th><th align=\'left\' bgcolor=\'#eeeeec\'>Function</th><th align=\'left\' bgcolor=\'#eeeeec\'>Location</th></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>1</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0001</td><td bgcolor=\'#eeeeec\' align=\'right\'>58132</td><td bgcolor=\'#eeeeec\'>{main}( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>0</td></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>2</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0004</td><td bgcolor=\'#eeeeec\' align=\'right\'>62436</td><td bgcolor=\'#eeeeec\'>foo( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>47</td></tr>
- <tr><th colspan=\'5\' align=\'left\' bgcolor=\'#e9b96e\'>Dump <i>$_SERVER</i></th></tr>
- <tr><td colspan=\'2\' align=\'right\' bgcolor=\'#eeeeec\' valign=\'top\'><pre>$_SERVER[\'REQUEST_URI\'] =</pre></td><td colspan=\'3\' bgcolor=\'#eeeeec\'><pre><small>string</small> <font color=\'#cc0000\'>\'/test/xdebug/docs/stack.php?level=5\'</font> <i>(length=35)</i>
- </pre></td></tr>
- </table></font>
- </div>
- <div id="add-local-vars">
- <pre>
- ini_set(\'xdebug.collect_vars\', \'on\');
- ini_set(\'xdebug.collect_params\', \'4\');
- ini_set(\'xdebug.dump_globals\', \'on\');
- ini_set(\'xdebug.dump.SERVER\', \'REQUEST_URI\');
- ini_set(\'xdebug.show_local_vars\', \'on\');
- </pre>
- <br />
- <font size=\'1\'><table border=\'1\' cellspacing=\'0\' cellpadding=\'1\'>
- <tr><th align=\'left\' bgcolor=\'#f57900\' colspan="5"><span style=\'background-color: #cc0000; color: #fce94f; font-size: x-large;\'>( ! )</span> Fatal error: Maximum execution time of 1 second exceeded in /home/httpd/html/test/xdebug/docs/stack.php on line <i>31</i></th></tr>
- <tr><th align=\'left\' bgcolor=\'#e9b96e\' colspan=\'5\'>Call Stack</th></tr>
- <tr><th align=\'center\' bgcolor=\'#eeeeec\'>#</th><th align=\'left\' bgcolor=\'#eeeeec\'>Time</th><th align=\'left\' bgcolor=\'#eeeeec\'>Memory</th><th align=\'left\' bgcolor=\'#eeeeec\'>Function</th><th align=\'left\' bgcolor=\'#eeeeec\'>Location</th></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>1</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0001</td><td bgcolor=\'#eeeeec\' align=\'right\'>58132</td><td bgcolor=\'#eeeeec\'>{main}( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>0</td></tr>
- <tr><td bgcolor=\'#eeeeec\' align=\'center\'>2</td><td bgcolor=\'#eeeeec\' align=\'center\'>0.0005</td><td bgcolor=\'#eeeeec\' align=\'right\'>62588</td><td bgcolor=\'#eeeeec\'>foo( )</td><td title=\'/home/httpd/html/test/xdebug/docs/stack.php\' bgcolor=\'#eeeeec\'>../stack.php<b>:</b>47</td></tr>
- <tr><th colspan=\'5\' align=\'left\' bgcolor=\'#e9b96e\'>Dump <i>$_SERVER</i></th></tr>
- <tr><td colspan=\'2\' align=\'right\' bgcolor=\'#eeeeec\' valign=\'top\'><pre>$_SERVER[\'REQUEST_URI\'] =</pre></td><td colspan=\'3\' bgcolor=\'#eeeeec\'><pre><small>string</small> <font color=\'#cc0000\'>\'/test/xdebug/docs/stack.php?level=6\'</font> <i>(length=35)</i>
- </pre></td></tr>
- <tr><th align=\'left\' colspan=\'5\' bgcolor=\'#e9b96e\'>Variables in local scope (#2)</th></tr>
- <tr><td colspan=\'2\' align=\'right\' bgcolor=\'#eeeeec\' valign=\'top\'><pre>$a =</pre></td><td colspan=\'4\' bgcolor=\'#eeeeec\'><pre>
- <b>array</b>
- 42 <font color=\'#888a85\'>=></font> <small>boolean</small> <font color=\'#75507b\'>false</font>
- \'foo\' <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>912124</font>
- 43 <font color=\'#888a85\'>=></font>
- <b>object</b>(<i>stdClass</i>)[<i>1</i>]
- <i>public</i> \'bar\' <font color=\'#888a85\'>=></font> <small>int</small> <font color=\'#4e9a06\'>100</font>
- 44 <font color=\'#888a85\'>=></font>
- <b>object</b>(<i>stdClass</i>)[<i>2</i>]
- 45 <font color=\'#888a85\'>=></font> <b>resource</b>(<i>2</i><font color=\'#2e3436\'>,</font> <i>stream</i>)
- </pre></td></tr>
- <tr><td colspan=\'2\' align=\'right\' bgcolor=\'#eeeeec\' valign=\'top\'><pre>$i =</pre></td><td colspan=\'4\' bgcolor=\'#eeeeec\'><pre><small>int</small> <font color=\'#4e9a06\'>275447</font>
- </pre></td></tr>
- </table></font>
- </div>
- </div>
- </div>',
- array( 'tabfields' => array( 'collectparams', 'othersettings' ) )
- ),
- 'execution_trace' => array(
- 'Function Traces',
- FUNC_FUNCTION_TRACE,
- 'Xdebug allows you to log all function calls, including parameters and
- return values to a file in different formats.',
- '
- <p>
- Those so-called "function traces" can be a help for when you are new to an
- application or when you are trying to figure out what exactly is going on when
- your application is running. The function traces can optionally also show the
- values of variables passed to the functions and methods, and also return
- values. In the default traces those two elements are not available.
- </p>
- <h2>Output Formats</h2>
- <p>
- There are three output formats. One is meant as a human readable trace, another
- one is more suited for computer programs as it is easier to parse, and the last
- one uses HTML for formatting the trace. You can switch between the two
- different formats with the [CFG:trace_format] setting. There are a few settings
- that control which information is written to the trace files. There are
- settings for including variables ([CFG:collect_params]) and for including
- return values ([CFG:collect_return]) for example. The example below shows what
- effect the different settings have for the human readable function traces.
- </p>
- <h3>The Script</h3>
- <div class="example">
- <p>
- <code><span style="color: #000000">
- <span style="color: #0000BB"><?php<br />$str </span><span style="color: #007700">= </span><span style="color: #DD0000">"Xdebug"</span><span style="color: #007700">;<br />function </span><span style="color: #0000BB">ret_ord</span><span style="color: #007700">( </span><span style="color: #0000BB">$c </span><span style="color: #007700">)<br />{<br /> return </span><span style="color: #0000BB">ord</span><span style="color: #007700">( </span><span style="color: #0000BB">$c </span><span style="color: #007700">);<br />}<br /><br />foreach ( </span><span style="color: #0000BB">str_split</span><span style="color: #007700">( </span><span style="color: #0000BB">$str </span><span style="color: #007700">) as </span><span style="color: #0000BB">$char </span><span style="color: #007700">)<br />{<br /> echo </span><span style="color: #0000BB">$char</span><span style="color: #007700">, </span><span style="color: #DD0000">": "</span><span style="color: #007700">, </span><span style="color: #0000BB">ret_ord</span><span style="color: #007700">( </span><span style="color: #0000BB">$char </span><span style="color: #007700">), </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?><br /></span>
- </span>
- </code>
- </p>
- </div>
- <h3>The Results</h3>
- <p>
- Below are the results with different settings of the [CFG:collect_params]
- setting. As this is not a web environment the value of 2 does not have any
- meaning as tool tips don\'t work in text files.
- </p>
- <div id="collectparams" class="yui-navset">
- <ul class="yui-nav">
- <li class="selected"><a href="#default1"><em>default</em></a></li>
- <li><a href="#collect-params-1"><em>collect_params=1</em></a></li>
- <li><a href="#collect-params-3"><em>collect_params=3</em></a></li>
- <li><a href="#collect-params-4"><em>collect_params=4</em></a></li>
- </ul>
- <div class="yui-content">
- <div id="default1">
- <pre class="shell">
- TRACE START [2007-05-06 14:37:06]
- 0.0003 114112 -> {main}() ../trace.php:0
- 0.0004 114272 -> str_split() ../trace.php:8
- 0.0153 117424 -> ret_ord() ../trace.php:10
- 0.0165 117584 -> ord() ../trace.php:5
- 0.0166 117584 -> ret_ord() ../trace.php:10
- 0.0167 117584 -> ord() ../trace.php:5
- 0.0168 117584 -> ret_ord() ../trace.php:10
- 0.0168 117584 -> ord() ../trace.php:5
- 0.0170 117584 -> ret_ord() ../trace.php:10
- 0.0170 117584 -> ord() ../trace.php:5
- 0.0172 117584 -> ret_ord() ../trace.php:10
- 0.0172 117584 -> ord() ../trace.php:5
- 0.0173 117584 -> ret_ord() ../trace.php:10
- 0.0174 117584 -> ord() ../trace.php:5
- 0.0177 41152
- TRACE END [2007-05-06 14:37:07]
- </pre>
- </div>
- <div id="collect-params-1">
- <pre class="shell">
- TRACE START [2007-05-06 14:37:11]
- 0.0003 114112 -> {main}() ../trace.php:0
- 0.0004 114272 -> str_split(string(6)) ../trace.php:8
- 0.0007 117424 -> ret_ord(string(1)) ../trace.php:10
- 0.0007 117584 -> ord(string(1)) ../trace.php:5
- 0.0009 117584 -> ret_ord(string(1)) ../trace.php:10
- 0.0009 117584 -> ord(string(1)) ../trace.php:5
- 0.0010 117584 -> ret_ord(string(1)) ../trace.php:10
- 0.0011 117584 -> ord(string(1)) ../trace.php:5
- 0.0012 117584 -> ret_ord(string(1)) ../trace.php:10
- 0.0013 117584 -> ord(string(1)) ../trace.php:5
- 0.0014 117584 -> ret_ord(string(1)) ../trace.php:10
- 0.0014 117584 -> ord(string(1)) ../trace.php:5
- 0.0016 117584 -> ret_ord(string(1)) ../trace.php:10
- 0.0016 117584 -> ord(string(1)) ../trace.php:5
- 0.0019 41152
- TRACE END [2007-05-06 14:37:11]
- </pre>
- </div>
- <div id="collect-params-3">
- <pre class="shell">
- TRACE START [2007-05-06 14:37:13]
- 0.0003 114112 -> {main}() ../trace.php:0
- 0.0004 114272 -> str_split(\'Xdebug\') ../trace.php:8
- 0.0007 117424 -> ret_ord(\'X\') ../trace.php:10
- 0.0007 117584 -> ord(\'X\') ../trace.php:5
- 0.0009 117584 -> ret_ord(\'d\') ../trace.php:10
- 0.0009 117584 -> ord(\'d\') ../trace.php:5
- 0.0010 117584 -> ret_ord(\'e\') ../trace.php:10
- 0.0011 117584 -> ord(\'e\') ../trace.php:5
- 0.0012 117584 -> ret_ord(\'b\') ../trace.php:10
- 0.0013 117584 -> ord(\'b\') ../trace.php:5
- 0.0014 117584 -> ret_ord(\'u\') ../trace.php:10
- 0.0014 117584 -> ord(\'u\') ../trace.php:5
- 0.0016 117584 -> ret_ord(\'g\') ../trace.php:10
- 0.0016 117584 -> ord(\'g\') ../trace.php:5
- 0.0019 41152
- TRACE END [2007-05-06 14:37:13]
- </pre>
- </div>
- <div id="collect-params-4">
- <pre class="shell">
- TRACE START [2007-05-06 14:37:16]
- 0.0003 114112 -> {main}() ../trace.php:0
- 0.0004 114272 -> str_split(\'Xdebug\') ../trace.php:8
- 0.0007 117424 -> ret_ord($c = \'X\') ../trace.php:10
- 0.0007 117584 -> ord(\'X\') ../trace.php:5
- 0.0009 117584 -> ret_ord($c = \'d\') ../trace.php:10
- 0.0009 117584 -> ord(\'d\') ../trace.php:5
- 0.0010 117584 -> ret_ord($c = \'e\') ../trace.php:10
- 0.0011 117584 -> ord(\'e\') ../trace.php:5
- 0.0012 117584 -> ret_ord($c = \'b\') ../trace.php:10
- 0.0013 117584 -> ord(\'b\') ../trace.php:5
- 0.0014 117584 -> ret_ord($c = \'u\') ../trace.php:10
- 0.0014 117584 -> ord(\'u\') ../trace.php:5
- 0.0016 117584 -> ret_ord($c = \'g\') ../trace.php:10
- 0.0016 117584 -> ord(\'g\') ../trace.php:5
- 0.0019 41152
- TRACE END [2007-05-06 14:37:16]
- </pre>
- </div>
- </div>
- </div>
- <p>
- Besides the [CFG:collect_params] settings there is another number of settings
- that affect the output of trace files. The first tab "default" shows the same
- as the default as above. The second tab "show_mem_delta=1" also shows the
- memory usage difference between two different lines in the output file.
- </p>
- <p>
- On the "collect_return=1" tab the return values of all the function calls are
- also visible. This you turn on with the [CFG:collect_return] setting.
- </p>
- <p>
- The tab called "collect_assignments=1" shows variable assigments, which can be
- turned on with the [CFG:collect_assignments] setting.
- </p>
- <p>
- The last tab shows a different output format that is much easier to parse, but
- harder to read. The [CFG:trace_format] setting is therefore mostly useful if
- there is an additional tool to interpret the trace files.
- </p>
- <div id="othersettings" class="yui-navset">
- <ul class="yui-nav">
- <li class="selected"><a href="#default2"><em>default</em></a></li>
- <li><a href="#mem-delta"><em>show_mem_delta=1</em></a></li>
- <li><a href="#collect-return"><em>collect_return=1</em></a></li>
- <li><a href="#trace-format"><em>trace_format=1</em></a></li>
- </ul>
- <div class="yui-content">
- <div id="default2">
- <pre class="shell">
- TRACE START [2007-05-06 14:37:06]
- 0.0003 114112 -> {main}() ../trace.php:0
- 0.0004 114272 -> str_split() ../trace.php:8
- 0.0153 117424 -> ret_ord() ../trace.php:10
- 0.0165 117584 -> ord() ../trace.php:5
- 0.0166 117584 -> ret_ord() ../trace.php:10
- 0.0167 117584 -> ord() ../trace.php:5
- 0.0168 117584 -> ret_ord() ../trace.php:10
- 0.0168 117584 -> ord() ../trace.php:5
- 0.0170 117584 -> ret_ord() ../trace.php:10
- 0.0170 117584 -> ord() ../trace.php:5
- 0.0172 117584 -> ret_ord() ../trace.php:10
- 0.0172 117584 -> ord() ../trace.php:5
- 0.0173 117584 -> ret_ord() ../trace.php:10
- 0.0174 117584 -> ord() ../trace.php:5
- 0.0177 41152
- TRACE END [2007-05-06 14:37:07]
- </pre>
- </div>
- <div id="mem-delta">
- <pre class="shell">
- TRACE START [2007-05-06 14:37:26]
- 0.0003 114112 +114112 -> {main}() ../trace.php:0
- 0.0004 114272 +160 -> str_split(\'Xdebug\') ../trace.php:8
- 0.0007 117424 +3152 -> ret_ord($c = \'X\') ../trace.php:10
- 0.0007 117584 +160 -> ord(\'X\') ../trace.php:5
- 0.0009 117584 +0 -> ret_ord($c = \'d\') ../trace.php:10
- 0.0009 117584 +0 -> ord(\'d\') ../trace.php:5
- 0.0011 117584 +0 -> ret_ord($c = \'e\') ../trace.php:10
- 0.0011 117584 +0 -> ord(\'e\') ../trace.php:5
- 0.0013 117584 +0 -> ret_ord($c = \'b\') ../trace.php:10
- 0.0013 117584 +0 -> ord(\'b\') ../trace.php:5
- 0.0014 117584 +0 -> ret_ord($c = \'u\') ../trace.php:10
- 0.0015 117584 +0 -> ord(\'u\') ../trace.php:5
- 0.0016 117584 +0 -> ret_ord($c = \'g\') ../trace.php:10
- 0.0017 117584 +0 -> ord(\'g\') ../trace.php:5
- 0.0019 41152
- TRACE END [2007-05-06 14:37:26]
- </pre>
- </div>
- <div id="collect-return">
- <pre class="shell">
- TRACE START [2007-05-06 14:37:35]
- 0.0003 114112 -> {main}() ../trace.php:0
- 0.0004 114272 -> str_split(\'Xdebug\') ../trace.php:8
- >=> array (0 => \'X\', 1 => \'d\', 2 => \'e\', 3 => \'b\', 4 => \'u\', 5 => \'g\')
- 0.0007 117424 -> ret_ord($c = \'X\') ../trace.php:10
- 0.0007 117584 -> ord(\'X\') ../trace.php:5
- >=> 88
- >=> 88
- 0.0009 117584 -> ret_ord($c = \'d\') ../trace.php:10
- 0.0009 117584 -> ord(\'d\') ../trace.php:5
- >=> 100
- >=> 100
- 0.0011 117584 -> ret_ord($c = \'e\') ../trace.php:10
- 0.0011 117584 -> ord(\'e\') ../trace.php:5
- >=> 101
- >=> 101
- 0.0013 117584 -> ret_ord($c = \'b\') ../trace.php:10
- 0.0013 117584 -> ord(\'b\') ../trace.php:5
- >=> 98
- >=> 98
- 0.0015 117584 -> ret_ord($c = \'u\') ../trace.php:10
- 0.0016 117584 -> ord(\'u\') ../trace.php:5
- >=> 117
- >=> 117
- 0.0017 117584 -> ret_ord($c = \'g\') ../trace.php:10
- 0.0018 117584 -> ord(\'g\') ../trace.php:5
- >=> 103
- >=> 103
- >=> 1
- 0.0021 41152
- TRACE END [2007-05-06 14:37:35]
- </pre>
- </div>
- <div id="trace-format">
- <pre class="shell">
- Versi…
Large files files are truncated, but you can click here to view the full file