title: PHP sort multidimensional objects by property value
body: <p>After hours of research i decided to ask this question, bcoz no solution found so far.
  I need to sort multidimensional objects by property value, objects are results of json_decode() of a multidimensional json, so i need to sort following objects by <code>order</code> property:</p>
  
  <pre><code>    stdClass Object
  (
      [main] =&gt; stdClass Object
          (
              [order] =&gt; 1
              [size] =&gt; 100
              [child] =&gt; stdClass Object
                  (
                      [c1] =&gt; stdClass Object
                          (
                              [order] =&gt; 2 // must be second item
                              [size] =&gt; 100
                              [child] =&gt; stdClass Object
                                  (
                                      [d1] =&gt; stdClass Object
                                          (
                                              [order] =&gt; 1
                                              [size] =&gt; 100
                                          )
                                  )
                          )
                      [c2] =&gt; stdClass Object
                          (
                              [order] =&gt; 1, // must be first item
                              [size] =&gt; 100,
                              [child] =&gt; stdClass Object
                                  (
                                      [d2] =&gt; stdClass Object
                                          (
                                              [order] =&gt; 1
                                              [size] =&gt; 100
                                          )
                                  )                           
                          )
  </code></pre>
  
  <p>Thank you!</p>