title: PHP: is there a way to see "invisible" characters like \n
body: <p>Is there a way to see invisible characters like whitespace, newlines, and other non-printing characters in a manner like print_r() ?</p>
  
  <p>Reason is there is some sort of character in my array that I can't see and breaking things.</p>
  
  <pre><code>Object Object
  (
    [name] =&gt; name
    [numbers] =&gt; Array
        (
            [0] =&gt; 123
  
            [1] =&gt; 456
            [2] =&gt; 789
        )
     [action] =&gt; nothing
  )
  </code></pre>
  
  <p>See the weird whitespace between [0] and [1]? When printing out [0] a newline gets printed as well. But no where do I assign a newline to [0] so I'm quite confused. </p>
  
  <p>Is there a built in function in php that's like <code>show_invisible(Object-&gt;numbers[0])</code> and it will show <code>123\n</code> or similar?</p>