title: get object values as array in php
body: <p>I have object  with setter and getter</p>
  
  <pre><code>  class obj{
       private $a;
       private $b;
  
    }
  </code></pre>
  
  <p>I would like to create an array that get only the value of the object , for example </p>
  
  <pre><code>array = ["1","2"]
  </code></pre>
  
  <p>tried get_object_vars but its an associative array</p>