"This function sorts an array such that array indices maintain their correlation with the array elements they are associated with."
Note this sentence in the description has a quite important implication especially when you're working with an originally non-indexed (or say integer-indexed) array and JSON encoding/decoding.
I'm not reporting this as a bug, because the end result does fit into the description.
<?php
$myArray = ['small_image', 'image'];
var_dump(json_encode($myArray)); var_dump(is_object($myArray)); asort($myArray);
$myJson = json_encode($myArray);
var_dump($myJson); var_dump(is_object($myArray)); var_dump(json_decode($myJson));
?>