Simple Dumps

First note that you can take an easy quick look at the PHP code that produced the output you see here. Just click on the underlined filename and line in the first line of header. This will open a source snippet with the line number of the HLI function call marked with red background.

Some configuration options are shown here. They are set via the function hli(). To use it, pass the option's name as first and the new value as second parameter.

All dumps on this page are done without any plugins and can be accomplished from inside plugins, too. It's like a generic highlighter. Plugins are disabled using the following command, but it's very unlikely that you will ever use it …

hli('clearPlugins');

String Dump

String dumping has the goal to print the string as it would be printed in text/plain, meaning that XML-tags and -entities are displayed plain and backslashes are printed as are.

visit HLI#X
1. pre($str) type: string
in builder\features\simpleDumps.php on line 39
'Strings are displayed plain with <html>tags</html> &amp; entities displayed as are.'
*** global scope ***
visit HLI#X
2. pre('\'No problems with \\\'escap[…]) type: string
''No problems with \'escaped\' strings escaped with \''

By default, strings are surrounded by single quotes as is IMHO the recommended way to write strings in PHP. However, if you don't like that, you can set it to use double quotes or even no quotes by the following commands:

hli('quotesOnStrings','double');
visit HLI#X
3. pre('A string with double quotes') type: string
in builder\features\simpleDumps.php on line 47
"A string with double quotes"
*** global scope ***
hli('quotesOnStrings','none');
visit HLI#X
4. pre('A string with no quotes') type: string
in builder\features\simpleDumps.php on line 49
A string with no quotes
*** global scope ***

Note that changing this has no effect on how quotation marks or backslashes inside the string are handled. This would just cause confusion and be of no help.

Integers and Floats

Integers and Floats are just highlighted. No further modification is done. But note that HLI returns the value as PHP returns it, not necessarily as you typed it. See the “e”-examples.

Also these dumps are all done this only one function call: You can pass any number of parameters to remote functions and get them all dumped one by one. HLI will only print the backtrace and the source snippet once.

visit HLI#X
5. pre(1) type: integer
in builder\features\simpleDumps.php on line 65
1
*** global scope ***
visit HLI#X
6. pre(1e3) type: double
1000
visit HLI#X
7. pre(1e-3) type: double
0.001
visit HLI#X
8. pre(true) type: boolean
true
visit HLI#X
9. pre(false) type: boolean
false
visit HLI#X
10. pre(null) type: NULL
NULL

You can pass an arbitrary number of arguments to pre() and ex() – even zero, if you need nothing but the backtrace.

visit HLI#X
11. pre()
in builder\features\simpleDumps.php on line 70
*** global scope ***

These outputs you will not see as regular dump, as they are superseded by the Recursion Plugin. But they are used in the backtrace to indicate the parameters used.

visit HLI#X
12. pre(array(1,2,3)) type: array
in builder\features\simpleDumps.php on line 76
Array[3]
*** global scope ***
visit HLI#X
13. pre(new DOMDocument) type: DOMDocument (object)
in builder\features\simpleDumps.php on line 77
DOMDocument
*** global scope ***
HLI