3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = json_decode('{"528":5,"527":1,"526":2,"524":6}',1); //<--- converting the object to an array , by passing second arg 1 asort($arr);// sorting the array in ascending .... $arr = json_encode($arr); //encoding back ! echo $arr;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1OmNi
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%22528%22%3A5%2C%22527%22%3A1%2C%22526%22%3A2%2C%22524%22%3A6%7D'
          2        SEND_VAL                                                 1
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    3     5        INIT_FCALL                                               'asort'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                                 
    4     8        INIT_FCALL                                               'json_encode'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !0, $4
    5    12        ECHO                                                     !0
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.42 ms | 1385 KiB | 19 Q