3v4l.org

run code in 500+ PHP versions simultaneously
<?php $json = <<<JSON { "status": "OK", "page": { "rows": 5000, "more": 0, "number": 1 }, "accounts": [ { "connected": 0, "settings": { "link_first_study_only": "0", "update_study_source_on_notify": "1", "link_external_whitelist": "", "other_ingress_tags": "" }, "must_approve_upload": 0, "css": null, "share_via_gateway": 0, "password_expire": 90, "vanity": "medpics" } ] } JSON; $json = json_decode($json, true); function ksort_recursive(&$array) { ksort($array); foreach ($array as &$value) { if (is_array($value)) { ksort_recursive($value); } } } ksort_recursive($json); print_r($json);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qUAA0
function name:  (null)
number of ops:  13
compiled vars:  !0 = $json
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%7B%0A++++%22status%22%3A+%22OK%22%2C%0A++++%22page%22%3A+%7B%0A++++++++%22rows%22%3A+5000%2C%0A++++++++%22more%22%3A+0%2C%0A++++++++%22number%22%3A+1%0A++++%7D%2C%0A++++%22accounts%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22connected%22%3A+0%2C%0A++++++++++++%22settings%22%3A+%7B%0A++++++++++++++++%22link_first_study_only%22%3A+%220%22%2C%0A++++++++++++++++%22update_study_source_on_notify%22%3A+%221%22%2C%0A++++++++++++++++%22link_external_whitelist%22%3A+%22%22%2C%0A++++++++++++++++%22other_ingress_tags%22%3A+%22%22%0A++++++++++++%7D%2C%0A++++++++++++%22must_approve_upload%22%3A+0%2C%0A++++++++++++%22css%22%3A+null%2C%0A++++++++++++%22share_via_gateway%22%3A+0%2C%0A++++++++++++%22password_expire%22%3A+90%2C%0A++++++++++++%22vanity%22%3A+%22medpics%22%0A%0A++++++++%7D%0A++++%5D%0A%7D'
   31     1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     <true>
          4        DO_ICALL                                             $2      
          5        ASSIGN                                                       !0, $2
   42     6        INIT_FCALL                                                   'ksort_recursive'
          7        SEND_REF                                                     !0
          8        DO_FCALL                                          0          
   44     9        INIT_FCALL                                                   'print_r'
         10        SEND_VAR                                                     !0
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

Function ksort_recursive:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 126) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/qUAA0
function name:  ksort_recursive
number of ops:  14
compiled vars:  !0 = $array, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   33     0  E >   RECV                                                 !0      
   34     1        INIT_FCALL                                                   'ksort'
          2        SEND_REF                                                     !0
          3        DO_ICALL                                                     
   35     4      > FE_RESET_RW                                          $3      !0, ->12
          5    > > FE_FETCH_RW                                                  $3, !1, ->12
   36     6    >   TYPE_CHECK                                      128          !1
          7      > JMPZ                                                         ~4, ->11
   37     8    >   INIT_FCALL_BY_NAME                                           'ksort_recursive'
          9        SEND_VAR_EX                                                  !1
         10        DO_FCALL                                          0          
   35    11    > > JMP                                                          ->5
         12    >   FE_FREE                                                      $3
   40    13      > RETURN                                                       null

End of function ksort_recursive

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.15 ms | 3059 KiB | 17 Q