5

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 ?

Community
  • 1
  • 1
Jean
  • 762
  • 5
  • 12

4 Answers4

10

From PHP.net:

print_r — Prints human-readable information about a variable

so the answer is "readable"

Jason OOO
  • 3,567
  • 2
  • 25
  • 31
4

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.

Macmade
  • 52,708
  • 13
  • 106
  • 123
1

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
        )
)
Krimson
  • 7,386
  • 11
  • 60
  • 97
1

The _r stands for readable. This is visible when you display arrays in PHP. It shows a nice identation while doing so.

Visakh Vijayan
  • 648
  • 7
  • 16