logo
Home XtGem- Templates- XtScript- bottom
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
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
Reload
Array
(
    [0] => current
    [1] => test_function_0
    [2] => test_function_1
)
Array
(
    [func] => debugging_tools
    [rnd] => 754517333
    [url] => 
    [___t] => 
    [__xtblog_rss] => 
    [$v] => bbfcdf5fc1832c36b4358a31e3555c1e
    [$my_var] => my value
    [$my_other_var] => my other value
    [$html] => 
hello
)

Better dump_vars

[func] => debugging_tools
[rnd] => 754517333
[url] =>
[___t] =>
[__xtblog_rss] =>
[$v] => bbfcdf5fc1832c36b4358a31e3555c1e
[$my_var] => my value
[$my_other_var] => my other value
[$html] => <div>hello</div>
0.000005s.
Powered by XtGem
About us Contact Forum topÂ