title: PHP Convert object to array
body: <p>When a object with private variables, has converted (cast) to an array in php the array element keys will be started with </p>
  
  <blockquote>
    <p>*_</p>
  </blockquote>
  
  <p>. How to remove the "*_"s that exists at the beginning of array keys?</p>
  
  <p>For example</p>
  
  <pre><code>class Book {
      private $_name;
      private $_price;
  }
  </code></pre>
  
  <p>the array after casting</p>
  
  <pre><code>array('*_name' =&gt; 'abc', '*_price' =&gt; '100')
  </code></pre>
  
  <p>I want</p>
  
  <pre><code>array('name' =&gt; 'abc', 'price' =&gt; '100')
  </code></pre>