3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '[ { "profile_name": "J3S", "post_count": 9 }, { "profile_name": "John", "post_count": 3 }, { "profile_name": "sato", "post_count": 10 } ]'; $array = json_decode($data, true); array_multisort(array_column($array, 'post_count'), SORT_ASC, $array); echo json_encode($array, JSON_PRETTY_PRINT);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ePMSC
function name:  (null)
number of ops:  21
compiled vars:  !0 = $data, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B%0A++++%7B%0A++++++++%22profile_name%22%3A+%22J3S%22%2C%0A++++++++%22post_count%22%3A+9%0A++++%7D%2C%0A++++%7B%0A++++++++%22profile_name%22%3A+%22John%22%2C%0A++++++++%22post_count%22%3A+3%0A++++%7D%2C%0A++++%7B%0A++++++++%22profile_name%22%3A+%22sato%22%2C%0A++++++++%22post_count%22%3A+10%0A++++%7D%0A%5D'
   17     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   18     6        INIT_FCALL                                               'array_multisort'
          7        INIT_FCALL                                               'array_column'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 'post_count'
         10        DO_ICALL                                         $5      
         11        SEND_VAL                                                 $5
         12        SEND_VAL                                                 4
         13        SEND_REF                                                 !1
         14        DO_ICALL                                                 
   19    15        INIT_FCALL                                               'json_encode'
         16        SEND_VAR                                                 !1
         17        SEND_VAL                                                 128
         18        DO_ICALL                                         $7      
         19        ECHO                                                     $7
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.2 ms | 1399 KiB | 21 Q