最終更新:2012-09-26 (水) 01:27:43 (4230d)  

print_a
Top / print_a

件数を多く表示

print_a($ret,"max_y:5000;");

DbugL::help();

print_a(mixed input [, string option_string])


The function you will use most often, prints a colorful representation of your PHP data

$option_string must be in the CSS like syntax:

e.g. "max_y:5;window:1;label:my_array"

If there is no ":" in the options string, the whole string will be used as the text for the label. new

Valid options:
return: (0|1) Do not print the output and instead return it as a string.
label: (string) Draw a fieldset/legend around the output.
max_y: (1-n) Maximum number of items on the same level. [...] (defaults to 50)
pickle: (0|1) Print a serialized representation of the array instead of printing it as a table.
export: (0|1) Print PHP sourcecode of the array. new
trim_tabs: (0-n) Trim the leading tabs in multiline strings and pad with n tabs.
window: (string) The output should open in a new window (javascript), the parameter is also the title for the window.
window_link: (0|1) Don't open a window, just print a link which opens one when clicked. new
debug_level: (0-99) Only do something if the debug level value is <= the global debug level ($GLOBALS['DEBUGLIB_LVL'] default 99) new
You can also set it to an array with the levels you want to display e.g. $GLOBALS['DEBUGLIB_LVL'] = array(3,5)
avoid@: (0|1) If a key starts with the character "@", assume it is a recursive reference and don't follow it.
mail: (string) Mail the ouput as HTML mail to the supplied email address. new
mail_encoding: (string) encoding for the HTML mail. (defaults to "utf-8")

You can also use these
short parameter names
trim_tabs
0tt
label
0l
max_y
0y
return
0r
window
0w
window_link
0wl
debug_level
0lvl
show_objects
0so
pickle
0p
mail
0m
mail_encoding
0me
escape_html
0e

show_vars([string option_string])


Prints all superglobals like $_GET, $_POST, $_SESSION etc. in a big table.
Good for printing at the bottom of a page.

Options are the same as for print_a + the following options:
verbose: also show $_SERVER and $_ENV

script_runtime([bool return_mode [, string title [, string css_style]]] )


Prints the passed time since the start of the script (or the last script_runtime call) in seconds.

pre(string string [, string option_string])


Print a string so the whitespaces are visible in HTML.

option_string must be in the CSS like syntax:

eg. "r:1;trim_tabs:0;"

Possible options:
return: (0|1) return the output instead of printing it
trim_tabs: (0-n) same as in print_a()

You can disable the output of all the functions in a production environment by setting $GLOBALS['USE_DEBUGLIB'] to FALSE (e.g. trough auto_prepend in your php.ini).

And if you have to do some online debugging you can enable it again somewhere in your script by setting it to TRUE.