3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $array = array( "id1" => array("unique" => 3), "id2" => array("unique" => 5), "id3" => array("unique" => 1), ); usort($array, function ($a, $b){ if ($a['unique'] == $b) { return 0; } return ($a['unique'] < $b['unique']) ? -1 : 1; }); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8lHs0
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F8lHs0%3A13%240'
   18     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   21     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2F8lHs0%3A13%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.92 ms | 1388 KiB | 17 Q