3v4l.org

run code in 300+ PHP versions simultaneously
<?php $questionsets = array( "A" => array("category" => "Some Category A", "score" => 0), "B" => array("category" => "Some Category B", "score" => 29), "C" => array("category" => "Some Category C", "score" => 12), "D" => array("category" => "Some Category D", "score" => 88), "E" => array("category" => "Some Category E", "score" => 4), "F" => array("category" => "Some Category F", "score" => 22), "G" => array("category" => "Some Category G", "score" => 20), "H" => array("category" => "Some Category H", "score" => 40), "I" => array("category" => "Some Category I", "score" => 42) ); usort($questionsets,function($a,$b){return $b['score']-$a['score'];}); print_r($questionsets);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dsep9
function name:  (null)
number of ops:  10
compiled vars:  !0 = $questionsets
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fdsep9%3A15%240'
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   17     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fdsep9%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dsep9
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_R                                      ~2      !1, 'score'
          3        FETCH_DIM_R                                      ~3      !0, 'score'
          4        SUB                                              ~4      ~2, ~3
          5      > RETURN                                                   ~4
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fdsep9%3A15%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.94 ms | 1395 KiB | 17 Q