Usort multidimensional array in PHP is broken : Using the example straight from the docs, I can't see to figure out why I am getting the results I am.

    function cmp($a, $b)
    {
        return strcmp($a["fruit"], $b["fruit"]);
    }
    
    $fruits[0]["fruit"] = 1000;
    $fruits[1]["fruit"] = 600;
    $fruits[2]["fruit"] = 2180;
    
    echo ("<pre>");
    echo " before  \n";
    print_r($fruits);
    echo ("</pre>");
    
    usort($fruits, "cmp");
    
    echo ("<pre>");
    echo "  after \n";
    print_r($fruits);
    echo ("</pre>");

These are the results:

     before  
    Array
    (
        [0] => Array
            (
                [fruit] => 1000
            )
    
        [1] => Array
            (
                [fruit] => 600
            )
    
        [2] => Array
            (
                [fruit] => 2180
            )
    
    )
      after 
    Array
    (
        [0] => Array
            (
                [fruit] => 1000
            )

    [1] => Array
        (
            [fruit] => 2180
        )

    [2] => Array
        (
            [fruit] => 600
        )

)

I thought usort was meant to organise based on a value within a multidimensional array. Sometimes it sorts it, sometimes it just gives a random order as the output array. Am I missing something? Also, this is defo not a duplicate question, read it carefully there is nothing like it on this site.