Reputation: 772
I've seen this answer on so, but i'm not sure if it's the same for PHP... and if it is, what is the meaning of reentrant ?
Upvotes: 5
Views: 1148
Reputation: 718
The _r stands for readable. This is visible when you display arrays in PHP. It shows a nice identation while doing so.
Upvotes: 1
Reputation: 53970
From the PHP manual:
print_r — Prints human-readable information about a variable
The point of print_r
is that it prints infos about a variable in a human-readable way, as opposed to var_dump
, for instance...
So a good guess is that the r stands for readable.
Upvotes: 4
Reputation: 7664
print_r
will return any output is produces on the screen and produce a human readable format of an object
<?php
$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
print_r ($a);
?>
Will output
Array
(
[a] => apple
[b] => banana
[c] => Array
(
[0] => x
[1] => y
[2] => z
)
)
Upvotes: 1