Remove Duplicates from Sorted Array

https://leetcode.com/submissions/detail/275932720/

Your runtime beats 93.02 % of php submissions.

LeetCode
class Solution {

    /**
     * @param Integer[] $nums
     * @return Integer
     */
    function removeDuplicates(&$nums) {
        $nums = array_unique($nums);
        return count(array_unique($nums));
    }
}