3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( '56'=>array('class_name'=>'22','name'=>'jack','date'=>'2014'), '61'=>array('class_name'=>'33','name'=>'mary','date'=>'2012'), '57'=>array('class_name'=>'24','name'=>'lilei','date'=>'2015') ); uasort($arr, function($a, $b) { if( $a['class_name'] === $b['class_name'] ){ return $a['date'] - $b['date']; } return $a['class_name'] - $b['class_name']; }); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KQMGo
function name:  (null)
number of ops:  10
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'uasort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FKQMGo%3A9%240'
   14     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   16     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FKQMGo%3A9%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KQMGo
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        FETCH_DIM_R                                      ~2      !0, 'class_name'
          3        FETCH_DIM_R                                      ~3      !1, 'class_name'
          4        IS_IDENTICAL                                             ~2, ~3
          5      > JMPZ                                                     ~4, ->10
   11     6    >   FETCH_DIM_R                                      ~5      !0, 'date'
          7        FETCH_DIM_R                                      ~6      !1, 'date'
          8        SUB                                              ~7      ~5, ~6
          9      > RETURN                                                   ~7
   13    10    >   FETCH_DIM_R                                      ~8      !0, 'class_name'
         11        FETCH_DIM_R                                      ~9      !1, 'class_name'
         12        SUB                                              ~10     ~8, ~9
         13      > RETURN                                                   ~10
   14    14*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FKQMGo%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.37 ms | 1396 KiB | 17 Q