It because of in case of no index if user creates element with random integer index we still need to use array_values() before save data into collection or it will be saved as object not array. I'm not sure I understand what you are trying to do, would you give me a test case you want to class pass?