title: Get value of array stdClass Object
body: <p>I am performing an insertion of values ​​using an api.
  then, I send the values ​​correctly and get the return on the same page.
  Eg:</p>
  <pre><code>&lt;?php
  ...
  $return= $set-&gt;createCharge([
     'description'    =&gt; 'Strings etc...',
     'amount'     =&gt; 10.0
  )];
  
  print_r($return);
  </code></pre>
  <p>?&gt;</p>
  <p><strong>This print_r Result is:</strong></p>
  <pre><code>stdClass Object
  (
  [data] =&gt; stdClass Object
      (
          [charges] =&gt; Array
              (
                  [0] =&gt; stdClass Object
                      (
                          [code] =&gt; 555
                          [reference] =&gt; 66
                          [dueDate] =&gt; 23/11/2020
                          [checkoutUrl] =&gt; https://url/number_return
                          [link] =&gt; https://url_return
                          [installmentLink] =&gt; https://url
                          [payNumber] =&gt; 9999999999
                          [billetDetails] =&gt; stdClass Object
                              (
                                  [bankAccount] =&gt; 888888
                                  [ourNumber] =&gt; 12121-9
                                  [barcodeNumber] =&gt; 0541454141411141414141414
                                  [portfolio] =&gt; 0001
                              )
  
                      )
  
              )
  
      )
  
  [success] =&gt; 1
  </code></pre>
  <p>)</p>
  <p>I tried to get the value '[code']
  using the following:</p>
  <pre><code>echo $return[0]['code'];//Dont work
  
  echo $return['data']['charges'][0]['code'];//Dont Work
  </code></pre>
  <p>how can I get the value of [code] or another that is in that array?</p>