Better

Better design and more functionality than print_r.

Aware of data types

printR displays every data type with its own color and even parses JSON strings. (optional)

Displays Objects

printR even displays and objects properties and methods.

Example usage

printR::show($array);

Array (3 elements, line 111)

  • Here's to the
    (string) crazy ones
  • The misfits
    (string) The rebels
  • The round pegs
    Array
    • in the
      (string) square holes
    • The ones
      Array
      • who see
        (string) things differently

printR::show($JSONstring);

JSON (3 elements, line 119)

  • Because the people who are crazy enough
    (string) to think they can
  • change the world
    Array
    • [0]
      (string) are the ones
    • [1]
      (string) who do.
  • 0
    (integer) 1997

printR::show(42.1337);

double (line 133)

  • 42.1337

printR::show($string);

string (line 141)

  • <strong>HTML</strong> is escaped.

printR::show(true);

boolean (line 148)

  • true

printR::show(42);

integer (line 155)

  • 42

printR::show(new dummyClass());

Object (line 162)

  • [Class]
    dummyClass
  • [Properties]
    Array
    • thisIsAVar
      (string) with Content
    • iSenbahn
      (boolean) 1
  • [Methods]
    Array
    • [0]
      (string) andThisIsAFunction
    • [1]
      (string) iCan

printR::show(null);

NULL (line 169)