Date: Sun Apr 22 14:32:09 CEST 2007
User: Derick Rethans
Directory: xdebug
Log Message:
[4.00]
- Implemented different levels of showing variables.
Modified files:
xdebug/xdebug.c (version: 1.378)
Added files:
xdebug/tests/stacktrace_html_0.phpt (new version: 1.1)
xdebug/tests/stacktrace_html_1.phpt (new version: 1.1)
xdebug/tests/stacktrace_html_2.phpt (new version: 1.1)
xdebug/tests/stacktrace_html_3.phpt (new version: 1.1)
xdebug/tests/stacktrace_html_4.phpt (new version: 1.1)
xdebug/tests/stacktrace_html_4_novar.phpt (new version: 1.1)
xdebug/tests/stacktrace_text_0.phpt (new version: 1.1)
xdebug/tests/stacktrace_text_1.phpt (new version: 1.1)
xdebug/tests/stacktrace_text_2.phpt (new version: 1.1)
xdebug/tests/stacktrace_text_3.phpt (new version: 1.1)
xdebug/tests/stacktrace_text_4.phpt (new version: 1.1)
xdebug/tests/stacktrace_text_4_novar.phpt (new version: 1.1)
[FILE: /xdebug/xdebug.c]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.377
retrieving revision 1.378
diff -u -r1.377 -r1.378
--- xdebug/xdebug.c:1.377 Wed Apr 04 09:11:04 2007 GMT
+++ xdebug/xdebug.c Sun Apr 22 10:32:09 2007 GMT
@@ -1787,17 +1787,45 @@
c = 1;
}
+ if (i->var[j].name && XG(collect_params) >= 4) {
+ if (html) {
+ xdebug_str_add(&str, xdebug_sprintf("<span>$%s = </span>", i->var[j].name), 1);
+ } else {
+ xdebug_str_add(&str, xdebug_sprintf("$%s = ", i->var[j].name), 1);
+ }
+ }
+
if (i->var[j].addr) {
if (html) {
tmp_value = xdebug_get_zval_value(i->var[j].addr, 0, NULL);
tmp_fancy_value = xdebug_xmlize(tmp_value, strlen(tmp_value), &newlen);
tmp_fancy_synop_value = xdebug_get_zval_synopsis_fancy("", i->var[j].addr, &len, 0, NULL TSRMLS_CC);
- xdebug_str_add(&str, xdebug_sprintf("<span title='%s'>%s</span>", tmp_fancy_value, tmp_fancy_synop_value), 1);
+ switch (XG(collect_params)) {
+ case 1: // synopsis
+ xdebug_str_add(&str, xdebug_sprintf("<span>%s</span>", tmp_fancy_synop_value), 1);
+ break;
+ case 2: // synopsis + full in tooltip
+ xdebug_str_add(&str, xdebug_sprintf("<span title='%s'>%s</span>", tmp_fancy_value, tmp_fancy_synop_value), 1);
+ break;
+ case 3: // full
+ default:
+ xdebug_str_add(&str, xdebug_sprintf("<span>%s</span>", tmp_fancy_value), 1);
+ break;
+ }
xdfree(tmp_value);
efree(tmp_fancy_value);
xdfree(tmp_fancy_synop_value);
} else {
- tmp_value = xdebug_get_zval_synopsis(i->var[j].addr, 0, NULL);
+ switch (XG(collect_params)) {
+ case 1: // synopsis
+ case 2:
+ tmp_value = xdebug_get_zval_synopsis(i->var[j].addr, 0, NULL);
+ break;
+ case 3:
+ default:
+ tmp_value = xdebug_get_zval_value(i->var[j].addr, 0, NULL);
+ break;
+ }
if (tmp_value) {
xdebug_str_add(&str, xdebug_sprintf("%s", tmp_value), 1);
xdfree(tmp_value);
[FILE: /xdebug/tests/stacktrace_html_0.phpt]
--TEST--
Test stack traces (level0, html)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.collect_vars=0
xdebug.collect_params=0
xdebug.collect_returns=0
html_errors=1
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
<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: Call to undefined function poo() in /%s/stacktrace_html_0.php on line <i>4</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'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='/%s/stacktrace_html_0.php' bgcolor='#eeeeec'>../stacktrace_html_0.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>foo( )</td><td title='/%s/stacktrace_html_0.php' bgcolor='#eeeeec'>../stacktrace_html_0.php<b>:</b>14</td></tr>
</table></font>
[FILE: /xdebug/tests/stacktrace_html_1.phpt]
--TEST--
Test stack traces (level1, html)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.collect_vars=0
xdebug.collect_params=1
xdebug.collect_returns=0
html_errors=1
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
<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: Call to undefined function poo() in /%s/stacktrace_html_1.php on line <i>4</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'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='/%s/stacktrace_html_1.php' bgcolor='#eeeeec'>../stacktrace_html_1.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>foo( <span><font color='#ce5c00'>array(5)</font></span> )</td><td title='/%s/stacktrace_html_1.php' bgcolor='#eeeeec'>../stacktrace_html_1.php<b>:</b>14</td></tr>
</table></font>
[FILE: /xdebug/tests/stacktrace_html_2.phpt]
--TEST--
Test stack traces (level2, html)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.var_display_max_children=50
xdebug.var_display_max_depth=5
xdebug.var_display_max_length=64
xdebug.collect_vars=0
xdebug.collect_params=2
xdebug.collect_returns=0
html_errors=1
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
<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: Call to undefined function poo() in /%s/stacktrace_html_2.php on line <i>4</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'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='/%s/stacktrace_html_2.php' bgcolor='#eeeeec'>../stacktrace_html_2.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>foo( <span title='array (42 => FALSE, 'foo' => 912124, 43 => class stdClass { public $bar = 100 }, 44 => class stdClass { }, 45 => resource(5) of type (stream))'><font color='#ce5c00'>array(5)</font></span> )</td><td title='/%s/stacktrace_html_2.php' bgcolor='#eeeeec'>../stacktrace_html_2.php<b>:</b>14</td></tr>
</table></font>
[FILE: /xdebug/tests/stacktrace_html_3.phpt]
--TEST--
Test stack traces (level3, html)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.var_display_max_children=50
xdebug.var_display_max_depth=5
xdebug.var_display_max_length=64
xdebug.collect_vars=0
xdebug.collect_params=3
xdebug.collect_returns=0
html_errors=1
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
<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: Call to undefined function poo() in /%s/stacktrace_html_3.php on line <i>4</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'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='/%s/stacktrace_html_3.php' bgcolor='#eeeeec'>../stacktrace_html_3.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>foo( <span>array (42 => FALSE, 'foo' => 912124, 43 => class stdClass { public $bar = 100 }, 44 => class stdClass { }, 45 => resource(5) of type (stream))</span> )</td><td title='/%s/stacktrace_html_3.php' bgcolor='#eeeeec'>../stacktrace_html_3.php<b>:</b>14</td></tr>
</table></font>
[FILE: /xdebug/tests/stacktrace_html_4.phpt]
--TEST--
Test stack traces (level4, html)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.var_display_max_children=50
xdebug.var_display_max_depth=5
xdebug.var_display_max_length=64
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_returns=0
html_errors=1
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
<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: Call to undefined function poo() in /%s/stacktrace_html_4.php on line <i>4</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'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='/%s/stacktrace_html_4.php' bgcolor='#eeeeec'>../stacktrace_html_4.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</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(5) of type (stream))</span> )</td><td title='/%s/stacktrace_html_4.php' bgcolor='#eeeeec'>../stacktrace_html_4.php<b>:</b>14</td></tr>
</table></font>
[FILE: /xdebug/tests/stacktrace_html_4_novar.phpt]
--TEST--
Test stack traces (level4, html)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.var_display_max_children=50
xdebug.var_display_max_depth=5
xdebug.var_display_max_length=64
xdebug.collect_vars=0
xdebug.collect_params=4
xdebug.collect_returns=0
html_errors=1
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
<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: Call to undefined function poo() in /%s/stacktrace_html_4_novar.php on line <i>4</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'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='/%s/stacktrace_html_4_novar.php' bgcolor='#eeeeec'>../stacktrace_html_4_novar.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</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(5) of type (stream))</span> )</td><td title='/%s/stacktrace_html_4_novar.php' bgcolor='#eeeeec'>../stacktrace_html_4_novar.php<b>:</b>14</td></tr>
</table></font>
[FILE: /xdebug/tests/stacktrace_text_0.phpt]
--TEST--
Test stack traces (level0, text)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.collect_vars=0
xdebug.collect_params=0
xdebug.collect_returns=0
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
Fatal error: Call to undefined function poo() in /%s/stacktrace%s.php on line 4
Call Stack:
%w%f %w%d 1. {main}() /%s/stacktrace%s.php:0
%w%f %w%d 2. foo() /%s/stacktrace%s.php:14
[FILE: /xdebug/tests/stacktrace_text_1.phpt]
--TEST--
Test stack traces (level1, text)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.collect_vars=0
xdebug.collect_params=1
xdebug.collect_returns=0
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
Fatal error: Call to undefined function poo() in /%s/stacktrace%s.php on line 4
Call Stack:
%w%f %w%d 1. {main}() /%s/stacktrace%s.php:0
%w%f %w%d 2. foo(array(5)) /%s/stacktrace%s.php:14
[FILE: /xdebug/tests/stacktrace_text_2.phpt]
--TEST--
Test stack traces (level2, text)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.collect_vars=0
xdebug.collect_params=2
xdebug.collect_returns=0
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
Fatal error: Call to undefined function poo() in /%s/stacktrace%s.php on line 4
Call Stack:
%w%f %w%d 1. {main}() /%s/stacktrace%s.php:0
%w%f %w%d 2. foo(array(5)) /%s/stacktrace%s.php:14
[FILE: /xdebug/tests/stacktrace_text_3.phpt]
--TEST--
Test stack traces (level3, text)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.var_display_max_children=50
xdebug.var_display_max_depth=5
xdebug.var_display_max_length=64
xdebug.collect_vars=0
xdebug.collect_params=3
xdebug.collect_returns=0
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
Fatal error: Call to undefined function poo() in /%s/stacktrace%s.php on line 4
Call Stack:
%w%f %w%d 1. {main}() /%s/stacktrace%s.php:0
%w%f %w%d 2. foo(array (42 => FALSE, 'foo' => 912124, 43 => class stdClass { public $bar = 100 }, 44 => class stdClass { }, 45 => resource(5) of type (stream))) /%s/stacktrace%s.php:14
[FILE: /xdebug/tests/stacktrace_text_4.phpt]
--TEST--
Test stack traces (level4, text)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.var_display_max_children=50
xdebug.var_display_max_depth=5
xdebug.var_display_max_length=64
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_returns=0
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
Fatal error: Call to undefined function poo() in /%s/stacktrace%s.php on line 4
Call Stack:
%w%f %w%d 1. {main}() /%s/stacktrace%s.php:0
%w%f %w%d 2. foo($a = array (42 => FALSE, 'foo' => 912124, 43 => class stdClass { public $bar = 100 }, 44 => class stdClass { }, 45 => resource(5) of type (stream))) /%s/stacktrace%s.php:14
[FILE: /xdebug/tests/stacktrace_text_4_novar.phpt]
--TEST--
Test stack traces (level4, text)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.trace_format=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.var_display_max_children=50
xdebug.var_display_max_depth=5
xdebug.var_display_max_length=64
xdebug.collect_vars=0
xdebug.collect_params=4
xdebug.collect_returns=0
--FILE--
<?php
function foo( $a ) {
for ($i = 1; $i < $a['foo']; $i++) {
poo();
}
}
$c = new stdClass;
$c->bar = 100;
$a = array(
42 => false, 'foo' => 912124,
$c, new stdClass, fopen( '/etc/passwd', 'r' )
);
foo( $a );
?>
--EXPECTF--
Fatal error: Call to undefined function poo() in /%s/stacktrace%s.php on line 4
Call Stack:
%w%f %w%d 1. {main}() /%s/stacktrace%s.php:0
%w%f %w%d 2. foo($a = array (42 => FALSE, 'foo' => 912124, 43 => class stdClass { public $bar = 100 }, 44 => class stdClass { }, 45 => resource(5) of type (stream))) /%s/stacktrace%s.php:14
Received on Sun Apr 22 2007 - 14:32:12 BST
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST