dump_r()

html (default)

/usr/share/nginx/www/o-0.me/www/dump_r/index.php (line 17)

limited pre-expand and recursion

/usr/share/nginx/www/o-0.me/www/dump_r/index.php (line 26)

text-only

/usr/share/nginx/www/o-0.me/www/dump_r/index.php (line 31)
----------------------------------------------------------
$obj                { } myObject
  cow_publ            999
  moo_prot            666
  cat_priv            555
  self                {*}
  id                  12345
  name                'test string' 11
  name2               ''
  name3               '0' 1
  name4               'false' 5
  name5               'null' 4
  price               69.95
  address             { }
    street              '111 Any Sreet' 13
    zip                 60657
    city                'Chicago' 7
  ref_to_addr         {*}
  kids                [ ] 5
    multiln_str         'Lorem Ipsum is simply 
                         dummy text of the printing
                         and typesetting industry' 74
    0                   'blah' 4
    a                   null
    xxx                 { } myObject
      cow_publ            999
      moo_prot            666
      cat_priv            555
      self                {*}
  date_str            '2011-12-13 15:25:03' -3y 7m datetime
  not_date            '123456' 6
  otherSet            [ ] 1
  moaarSet            [ ] 5 recordset
    0                   { } Account
      name                'john' 4
      deposit             531.34
      active              true
    1                   { } Account
      name                'mary' 4
      deposit             95.15
      active              false
    2                   { } Account
      name                'michael' 7
      deposit             12.21
      active              false
    3                   { } Account
      name                'charles' 7
      deposit             1.01
      active              true
  anothSet            [ ] 5 recordset
    0                   [ ] 4
      abc                 'yay!' 4
      def                 false
      ghi                 152.15
    1                   [ ] 4
      abc                 'yay!' 4
      def                 true
      ghi                 152.15
    2                   [ ] 4
      abc                 'yay!' 4
      def                 0.01
      ghi                 152.15
    3                   [ ] 4
      abc                 'yay!' 4
      def                 true
      ghi                 152.15
  isFull              false
  food                null
  binary_str          'I  M  G  :  P  o  w  e  r  S  h  o  t     S  4  0     J  P  E  G  00 00 00 00 00 00 00 00 00 00
                       F  i  r  m  w  a  r  e     V  e  r  s  i  o  n     1  .  1  0  00 00 00 A  n  d  r  e  a  s
                       H  u  g  g  e  l  00 00 00 00 00 00 00 00 00 \r \n \t 00 00 00 00 00 00 00 00 00 *  00 03 00 01
                       80 z  01 01 80' 101 binary
  dom                 { } DOMDocument
  xml                 { } SimpleXMLElement
    moo                 'f' 1
    moo2                'g' 1
    sss                 '55.9' 4
  afile               < > /usr/share/nginx/www/o-0.me/www/dump_r/vendor/leeoniya/dump-r/test/obj.php stream
  afile_ref           <*> /usr/share/nginx/www/o-0.me/www/dump_r/vendor/leeoniya/dump-r/test/obj.php stream
  call_self           {*}
  call_closure        ( ) <closure> closure
  call_closure_ref    (*) <closure>
  call_inst_meth      ( ) <obj>,myFn instance
  call_static_str     ( ) lib::myFn static
  call_static_arr     ( ) lib,myFn static
  call_static_par     ( ) lib,parent::myFn static
  notfn               'pi' 2
  json_arr_str        '[true,false,null,{"a":"moo","b":false,"c":["hello","world",2.98,null],"d":"75"}]' 4 json array
    0                   true
    1                   false
    2                   null
    3                   { }
      a                   'moo' 3
      b                   false
      c                   [ ] 5
        0                   'hello' 5
        1                   'world' 5
        2                   2.98
        3                   null
      d                   '75' 2
  json_obj_str        '{"a":"moo","b":false,"c":["hello","world",2.98,null],"d":"75"}' json object
    a                   'moo' 3
    b                   false
    c                   [ ] 5
      0                   'hello' 5
      1                   'world' 5
      2                   2.98
      3                   null
    d                   '75' 2
  xml_str             '<?xml version="1.0" encoding="utf-8"?><root><moo attr="myAttribute">f</moo><moo2>g</moo2><sss>55.9</sss></root>' xml
    moo                 'f' 1
    moo2                'g' 1
    sss                 '55.9' 4
  sql_str             'SELECT firstname,lastname,mooo.blah,hehe.* FROM mytable moo INNER JOIN othertable hehe ON moo.id = hehe.some_id WHERE hehe.name IS NOT NULL AND moo.xxx = 'berries' GROUP BY foo.cookies ORDER BY foo.sum,moo.age DESC LIMIT 30,400' 227 sql
  str_trail           'trail space ' 12
  str_lead            ' lead space' 11
  str_bothspc         ' both space ' 12
  arr0                [ ] 4
    0                   'a' 1
    1                   'b' 1
    2                   'c' 1
  arr1                [*]
  arr3                [ ] 5
    0                   'a' 1
    1                   'b' 1
    2                   'c' 1
    3                   [*]
  sparse              [ ] 3
    7                   'sss' 3
    100                 'ddd' 3

limited recursion

/usr/share/nginx/www/o-0.me/www/dump_r/index.php (line 37)
----------------------------------------------------------
$obj                { } myObject
  cow_publ            999
  moo_prot            666
  cat_priv            555
  self                {*}
  id                  12345
  name                'test string' 11
  name2               ''
  name3               '0' 1
  name4               'false' 5
  name5               'null' 4
  price               69.95
  address             { }
  ref_to_addr         {*}
  kids                [ ] 5
  date_str            '2011-12-13 15:25:03' -3y 7m datetime
  not_date            '123456' 6
  otherSet            [ ] 1
  moaarSet            [ ] 5 recordset
  anothSet            [ ] 5 recordset
  isFull              false
  food                null
  binary_str          'I  M  G  :  P  o  w  e  r  S  h  o  t     S  4  0     J  P  E  G  00 00 00 00 00 00 00 00 00 00
                       F  i  r  m  w  a  r  e     V  e  r  s  i  o  n     1  .  1  0  00 00 00 A  n  d  r  e  a  s
                       H  u  g  g  e  l  00 00 00 00 00 00 00 00 00 \r \n \t 00 00 00 00 00 00 00 00 00 *  00 03 00 01
                       80 z  01 01 80' 101 binary
  dom                 { } DOMDocument
  xml                 { } SimpleXMLElement
  afile               < > /usr/share/nginx/www/o-0.me/www/dump_r/vendor/leeoniya/dump-r/test/obj.php stream
  afile_ref           <*> /usr/share/nginx/www/o-0.me/www/dump_r/vendor/leeoniya/dump-r/test/obj.php stream
  call_self           {*}
  call_closure        ( ) <closure> closure
  call_closure_ref    (*) <closure>
  call_inst_meth      ( ) <obj>,myFn instance
  call_static_str     ( ) lib::myFn static
  call_static_arr     ( ) lib,myFn static
  call_static_par     ( ) lib,parent::myFn static
  notfn               'pi' 2
  json_arr_str        '[true,false,null,{"a":"moo","b":false,"c":["hello","world",2.98,null],"d":"75"}]' 4 json array
  json_obj_str        '{"a":"moo","b":false,"c":["hello","world",2.98,null],"d":"75"}' json object
  xml_str             '<?xml version="1.0" encoding="utf-8"?><root><moo attr="myAttribute">f</moo><moo2>g</moo2><sss>55.9</sss></root>' xml
  sql_str             'SELECT firstname,lastname,mooo.blah,hehe.* FROM mytable moo INNER JOIN othertable hehe ON moo.id = hehe.some_id WHERE hehe.name IS NOT NULL AND moo.xxx = 'berries' GROUP BY foo.cookies ORDER BY foo.sum,moo.age DESC LIMIT 30,400' 227 sql
  str_trail           'trail space ' 12
  str_lead            ' lead space' 11
  str_bothspc         ' both space ' 12
  arr0                [ ] 4
  arr1                [*]
  arr3                [ ] 5
  sparse              [ ] 3

native print_r()

myObject Object
(
    [cow_publ] => 999
    [moo_prot:protected] => 666
    [cat_priv:myObject:private] => 555
    [self:protected] => myObject Object
 *RECURSION*
    [id] => 12345
    [name] => test string
    [name2] => 
    [name3] => 0
    [name4] => false
    [name5] => null
    [price] => 69.95
    [address] => stdClass Object
        (
            [street] => 111 Any Sreet
            [zip] => 60657
            [city] => Chicago
        )

    [ref_to_addr] => stdClass Object
        (
            [street] => 111 Any Sreet
            [zip] => 60657
            [city] => Chicago
        )

    [kids] => Array
        (
            [multiln_str] => Lorem Ipsum is simply 
dummy text of the printing
and typesetting industry
            [0] => blah
            [a] => 
            [xxx] => myObject Object
                (
                    [cow_publ] => 999
                    [moo_prot:protected] => 666
                    [cat_priv:myObject:private] => 555
                    [self:protected] => myObject Object
 *RECURSION*
                )

        )

    [date_str] => 2011-12-13 15:25:03
    [not_date] => 123456
    [otherSet] => Array
        (
        )

    [moaarSet] => Array
        (
            [0] => Account Object
                (
                    [name:protected] => john
                    [deposit:Account:private] => 531.34
                    [active] => 1
                )

            [1] => Account Object
                (
                    [name:protected] => mary
                    [deposit:Account:private] => 95.15
                    [active] => 
                )

            [2] => Account Object
                (
                    [name:protected] => michael
                    [deposit:Account:private] => 12.21
                    [active] => 
                )

            [3] => Account Object
                (
                    [name:protected] => charles
                    [deposit:Account:private] => 1.01
                    [active] => 1
                )

        )

    [anothSet] => Array
        (
            [0] => Array
                (
                    [abc] => yay!
                    [def] => 
                    [ghi] => 152.15
                )

            [1] => Array
                (
                    [abc] => yay!
                    [def] => 1
                    [ghi] => 152.15
                )

            [2] => Array
                (
                    [abc] => yay!
                    [def] => 0.01
                    [ghi] => 152.15
                )

            [3] => Array
                (
                    [abc] => yay!
                    [def] => 1
                    [ghi] => 152.15
                )

        )

    [isFull] => 
    [food] => 
    [binary_str] => IMG:PowerShot S40 JPEGFirmware Version 1.10Andreas Huggel
	*z
    [dom] => DOMDocument Object
        (
            [doctype] => 
            [implementation] => (object value omitted)
            [documentElement] => 
            [actualEncoding] => 
            [encoding] => 
            [xmlEncoding] => 
            [standalone] => 1
            [xmlStandalone] => 1
            [version] => 1.0
            [xmlVersion] => 1.0
            [strictErrorChecking] => 1
            [documentURI] => 
            [config] => 
            [formatOutput] => 
            [validateOnParse] => 
            [resolveExternals] => 
            [preserveWhiteSpace] => 1
            [recover] => 
            [substituteEntities] => 
            [nodeName] => #document
            [nodeValue] => 
            [nodeType] => 9
            [parentNode] => 
            [childNodes] => (object value omitted)
            [firstChild] => 
            [lastChild] => 
            [previousSibling] => 
            [attributes] => 
            [ownerDocument] => 
            [namespaceURI] => 
            [prefix] => 
            [localName] => 
            [baseURI] => 
            [textContent] => 
        )

    [xml] => SimpleXMLElement Object
        (
            [moo] => f
            [moo2] => g
            [sss] => 55.9
        )

    [afile] => Resource id #2
    [afile_ref] => Resource id #2
    [call_self] => myObject Object
 *RECURSION*
    [call_closure] => Closure Object
        (
            [parameter] => Array
                (
                    [$a] => 
                )

        )

    [call_closure_ref] => Closure Object
        (
            [parameter] => Array
                (
                    [$a] => 
                )

        )

    [call_inst_meth] => Array
        (
            [0] => myObject Object
 *RECURSION*
            [1] => myFn
        )

    [call_static_str] => lib::myFn
    [call_static_arr] => Array
        (
            [0] => lib
            [1] => myFn
        )

    [call_static_par] => Array
        (
            [0] => lib
            [1] => parent::myFn
        )

    [notfn] => pi
    [json_arr_str] => [true,false,null,{"a":"moo","b":false,"c":["hello","world",2.98,null],"d":"75"}]
    [json_obj_str] => {"a":"moo","b":false,"c":["hello","world",2.98,null],"d":"75"}
    [xml_str] => fg55.9
    [sql_str] => SELECT firstname,lastname,mooo.blah,hehe.* FROM mytable moo INNER JOIN othertable hehe ON moo.id = hehe.some_id WHERE hehe.name IS NOT NULL AND moo.xxx = 'berries' GROUP BY foo.cookies ORDER BY foo.sum,moo.age DESC LIMIT 30,400
    [str_trail] => trail space 
    [str_lead] =>  lead space
    [str_bothspc] =>  both space 
    [arr0] => Array
        (
            [0] => a
            [1] => b
            [2] => c
        )

    [arr1] => Array
        (
            [0] => a
            [1] => b
            [2] => c
        )

    [arr3] => Array
        (
            [0] => a
            [1] => b
            [2] => c
            [3] => Array
 *RECURSION*
        )

    [sparse] => Array
        (
            [7] => sss
            [100] => ddd
        )

)

native var_dump()

object(myObject)#5 (45) {
  ["cow_publ"]=>
  int(999)
  ["moo_prot":protected]=>
  int(666)
  ["cat_priv":"myObject":private]=>
  int(555)
  ["self":protected]=>
  *RECURSION*
  ["id"]=>
  int(12345)
  ["name"]=>
  string(11) "test string"
  ["name2"]=>
  string(0) ""
  ["name3"]=>
  string(1) "0"
  ["name4"]=>
  string(5) "false"
  ["name5"]=>
  string(4) "null"
  ["price"]=>
  float(69.95)
  ["address"]=>
  object(stdClass)#6 (3) {
    ["street"]=>
    string(13) "111 Any Sreet"
    ["zip"]=>
    int(60657)
    ["city"]=>
    string(7) "Chicago"
  }
  ["ref_to_addr"]=>
  object(stdClass)#6 (3) {
    ["street"]=>
    string(13) "111 Any Sreet"
    ["zip"]=>
    int(60657)
    ["city"]=>
    string(7) "Chicago"
  }
  ["kids"]=>
  array(4) {
    ["multiln_str"]=>
    string(74) "Lorem Ipsum is simply 
dummy text of the printing
and typesetting industry"
    [0]=>
    string(4) "blah"
    ["a"]=>
    NULL
    ["xxx"]=>
    object(myObject)#7 (4) {
      ["cow_publ"]=>
      int(999)
      ["moo_prot":protected]=>
      int(666)
      ["cat_priv":"myObject":private]=>
      int(555)
      ["self":protected]=>
      *RECURSION*
    }
  }
  ["date_str"]=>
  string(19) "2011-12-13 15:25:03"
  ["not_date"]=>
  string(6) "123456"
  ["otherSet"]=>
  array(0) {
  }
  ["moaarSet"]=>
  array(4) {
    [0]=>
    object(Account)#8 (3) {
      ["name":protected]=>
      string(4) "john"
      ["deposit":"Account":private]=>
      float(531.34)
      ["active"]=>
      bool(true)
    }
    [1]=>
    object(Account)#9 (3) {
      ["name":protected]=>
      string(4) "mary"
      ["deposit":"Account":private]=>
      float(95.15)
      ["active"]=>
      bool(false)
    }
    [2]=>
    object(Account)#10 (3) {
      ["name":protected]=>
      string(7) "michael"
      ["deposit":"Account":private]=>
      float(12.21)
      ["active"]=>
      bool(false)
    }
    [3]=>
    object(Account)#11 (3) {
      ["name":protected]=>
      string(7) "charles"
      ["deposit":"Account":private]=>
      float(1.01)
      ["active"]=>
      bool(true)
    }
  }
  ["anothSet"]=>
  array(4) {
    [0]=>
    array(3) {
      ["abc"]=>
      string(4) "yay!"
      ["def"]=>
      bool(false)
      ["ghi"]=>
      float(152.15)
    }
    [1]=>
    array(3) {
      ["abc"]=>
      string(4) "yay!"
      ["def"]=>
      bool(true)
      ["ghi"]=>
      float(152.15)
    }
    [2]=>
    array(3) {
      ["abc"]=>
      string(4) "yay!"
      ["def"]=>
      float(0.01)
      ["ghi"]=>
      float(152.15)
    }
    [3]=>
    array(3) {
      ["abc"]=>
      string(4) "yay!"
      ["def"]=>
      bool(true)
      ["ghi"]=>
      float(152.15)
    }
  }
  ["isFull"]=>
  bool(false)
  ["food"]=>
  NULL
  ["binary_str"]=>
  string(101) "IMG:PowerShot S40 JPEGFirmware Version 1.10Andreas Huggel
	*z"
  ["dom"]=>
  object(DOMDocument)#12 (34) {
    ["doctype"]=>
    NULL
    ["implementation"]=>
    string(22) "(object value omitted)"
    ["documentElement"]=>
    NULL
    ["actualEncoding"]=>
    NULL
    ["encoding"]=>
    NULL
    ["xmlEncoding"]=>
    NULL
    ["standalone"]=>
    bool(true)
    ["xmlStandalone"]=>
    bool(true)
    ["version"]=>
    string(3) "1.0"
    ["xmlVersion"]=>
    string(3) "1.0"
    ["strictErrorChecking"]=>
    bool(true)
    ["documentURI"]=>
    NULL
    ["config"]=>
    NULL
    ["formatOutput"]=>
    bool(false)
    ["validateOnParse"]=>
    bool(false)
    ["resolveExternals"]=>
    bool(false)
    ["preserveWhiteSpace"]=>
    bool(true)
    ["recover"]=>
    bool(false)
    ["substituteEntities"]=>
    bool(false)
    ["nodeName"]=>
    string(9) "#document"
    ["nodeValue"]=>
    NULL
    ["nodeType"]=>
    int(9)
    ["parentNode"]=>
    NULL
    ["childNodes"]=>
    string(22) "(object value omitted)"
    ["firstChild"]=>
    NULL
    ["lastChild"]=>
    NULL
    ["previousSibling"]=>
    NULL
    ["attributes"]=>
    NULL
    ["ownerDocument"]=>
    NULL
    ["namespaceURI"]=>
    NULL
    ["prefix"]=>
    string(0) ""
    ["localName"]=>
    NULL
    ["baseURI"]=>
    NULL
    ["textContent"]=>
    string(0) ""
  }
  ["xml"]=>
  object(SimpleXMLElement)#13 (3) {
    ["moo"]=>
    string(1) "f"
    ["moo2"]=>
    string(1) "g"
    ["sss"]=>
    string(4) "55.9"
  }
  ["afile"]=>
  resource(2) of type (stream)
  ["afile_ref"]=>
  resource(2) of type (stream)
  ["call_self"]=>
  *RECURSION*
  ["call_closure"]=>
  object(Closure)#14 (1) {
    ["parameter"]=>
    array(1) {
      ["$a"]=>
      string(10) ""
    }
  }
  ["call_closure_ref"]=>
  object(Closure)#14 (1) {
    ["parameter"]=>
    array(1) {
      ["$a"]=>
      string(10) ""
    }
  }
  ["call_inst_meth"]=>
  array(2) {
    [0]=>
    *RECURSION*
    [1]=>
    string(4) "myFn"
  }
  ["call_static_str"]=>
  string(9) "lib::myFn"
  ["call_static_arr"]=>
  array(2) {
    [0]=>
    string(3) "lib"
    [1]=>
    string(4) "myFn"
  }
  ["call_static_par"]=>
  array(2) {
    [0]=>
    string(3) "lib"
    [1]=>
    string(12) "parent::myFn"
  }
  ["notfn"]=>
  string(2) "pi"
  ["json_arr_str"]=>
  string(80) "[true,false,null,{"a":"moo","b":false,"c":["hello","world",2.98,null],"d":"75"}]"
  ["json_obj_str"]=>
  string(62) "{"a":"moo","b":false,"c":["hello","world",2.98,null],"d":"75"}"
  ["xml_str"]=>
  string(111) "fg55.9"
  ["sql_str"]=>
  string(227) "SELECT firstname,lastname,mooo.blah,hehe.* FROM mytable moo INNER JOIN othertable hehe ON moo.id = hehe.some_id WHERE hehe.name IS NOT NULL AND moo.xxx = 'berries' GROUP BY foo.cookies ORDER BY foo.sum,moo.age DESC LIMIT 30,400"
  ["str_trail"]=>
  string(12) "trail space "
  ["str_lead"]=>
  string(11) " lead space"
  ["str_bothspc"]=>
  string(12) " both space "
  ["arr0"]=>
  &array(3) {
    [0]=>
    string(1) "a"
    [1]=>
    string(1) "b"
    [2]=>
    string(1) "c"
  }
  ["arr1"]=>
  &array(3) {
    [0]=>
    string(1) "a"
    [1]=>
    string(1) "b"
    [2]=>
    string(1) "c"
  }
  ["arr3"]=>
  &array(4) {
    [0]=>
    string(1) "a"
    [1]=>
    string(1) "b"
    [2]=>
    string(1) "c"
    [3]=>
    *RECURSION*
  }
  ["sparse"]=>
  array(2) {
    [7]=>
    string(3) "sss"
    [100]=>
    string(3) "ddd"
  }
}
Fork me on GitHub