Gen. partnerAlgotech

PHP function print_r()

Prints human-readable information about a variable

|
September 11, 2019

Availability in PHP 4.0

Prints human-readable information about a variable

Parameters

Parameter Data type Default value Note
$expression mixed not The expression to be printed.
$return bool null If you would like to capture the output of print_r, use the return parameter. If this parameter is set to true, print_r will return its output, instead of printing it (which it does by default).

Return values

mixed

If given a string, integer or float, the value itself will be printed. If given an array, values will be presented in a format that shows keys and elements. Similar notation is used for objects.

Other resources

Official documentation for the print-r function

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.