Example 4
PHP Script Debugger ExamplesThis example demonstrates of using Debug Points to display texts and PHP variables. Place the mouse cursor over debug points (green rectangles).
This PHP code generates for you:
- 1. Text output: echo psd_text("Test\t <b>test</b> test\n")1
Test
\t<b>test</b> test\nTime:0.002026 sec. - 2. HTML output: echo psd_html("Test\t <b>test</b> test\n")2
Test test test
Time
:0.002147 sec.
Delta:0.000121 sec. - 3. Variable content: echo psd_var($x)3
var
=3.14 Time:0.002233 sec.
Delta:0.000086 sec. - 4. Multiple variable content: echo psd_var($x, $y, $z)4
var1[]
=Array(3)
var2=true
var3="text"
Time:0.002347 sec.
Delta:0.000114 sec. - 5. Very long text variable with truncation: echo psd_var($x)5
var
="1234567890123456789012345678901234567890\n1234567890123456789012345678901234567890\n1234567890123456789012345678901234567890\n1234567890123456789012345678901234567890\n1234567890123456789012345678901234567890\n1234567890123456789012345678901234567890\n1234567890..."Time:0.002454 sec.
Delta:0.000107 sec. - 6. Using psd_var_export to see arrays and objects: echo psd_var_export($x)6
array (
0 => 'aaa',
1 => 'bbb',
2 => 'ccc',
)
Time
:0.002562 sec.
Delta:0.000108 sec. - 7. Using psd_print_r to see arrays and objects: echo psd_print_r($x)7
Array
(
[0] => aaa
[1] => bbb
[2] => ccc
)
Time
:0.002643 sec.
Delta:0.000081 sec. - 8. Using psd_zval_dump to see arrays and objects: echo psd_zval_dump($x)8
array(3) refcount(1){
[0]=>
string(3) "aaa" refcount(2)
[1]=>
string(3) "bbb" refcount(2)
[2]=>
string(3) "ccc" refcount(2)
}
Time
:0.002736 sec.
Delta:0.000093 sec.
Debug Points also visible in HTML Source Panel.
