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.031976 sec. - 2. HTML output: echo psd_html("Test\t <b>test</b> test\n")2
Test test test
Time
:0.032138 sec.
Delta:0.000162 sec. - 3. Variable content: echo psd_var($x)3
var
=3.14 Time:0.032243 sec.
Delta:0.000105 sec. - 4. Multiple variable content: echo psd_var($x, $y, $z)4
var1[]
=Array(3)
var2=true
var3="text"
Time:0.032374 sec.
Delta:0.000131 sec. - 5. Very long text variable with truncation: echo psd_var($x)5
var
="1234567890123456789012345678901234567890\n1234567890123456789012345678901234567890\n1234567890123456789012345678901234567890\n1234567890123456789012345678901234567890\n1234567890123456789012345678901234567890\n1234567890123456789012345678901234567890\n1234567890..."Time:0.032486 sec.
Delta:0.000112 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.032586 sec.
Delta:0.000100 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.032677 sec.
Delta:0.000091 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.032775 sec.
Delta:0.000098 sec.
Debug Points also visible in HTML Source Panel.
