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 ?
From PHP.net:
print_r — Prints human-readable information about a variable
so the answer is "readable"
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.
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
)
)
The _r stands for readable. This is visible when you display arrays in PHP. It shows a nice identation while doing so.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With