debugging tools
Debug functions that will help you:
[...] = optional ... = your value
call dump_vars
call dump_functions
call args $foo=bar;$x=y;a=1
call execution_time
Example code
Show in textarea
<!--parser:xtscript-->
function test_function_0 $arg=apple
print $arg ;
endfunction
function test_function_1 $arg=banana
print $arg ;
endfunction
# dump of function names
call dump_functions
var $my_var=my value
var $my_other_var=my other value
var $html = <div>hello</div>;
# dump of variables
call dump_vars
#better dump_vars
print <br />Better dump_vars<br />
var $dump=call dump_vars
var $dump=call trim $val=$dump ; $charlist={{<pre>
Array/ }}
var $dump=call trim $val=$dump ; $charlist=( )
var $dump=call htmlspecialchars $val=$dump
var $dump=call nl2br $val=$dump
print <div>$dump</div>
#script execution time
call execution_time
<!--/parser:xtscript-->
Show in textarea Example output
Reload
Array
(
[0] => current
[1] => test_function_0
[2] => test_function_1
)
Array
(
[func] => debugging_tools
[rnd] => 2116269122
[url] =>
[___t] =>
[__xtblog_rss] =>
[$v] => 8b8f379c34f558c29f5b422dd3e16b67
[$my_var] => my value
[$my_other_var] => my other value
[$html] => hello
)
Better dump_vars
[func] => debugging_tools
[rnd] => 2116269122
[url] =>
[___t] =>
[__xtblog_rss] =>
[$v] => 8b8f379c34f558c29f5b422dd3e16b67
[$my_var] => my value
[$my_other_var] => my other value
[$html] => <div>hello</div>
0.000010s.