LeetCode 1089: Duplicate Zeros PHP Solution

class Solution {

    /**
     * @param Integer[] $arr
     * @return NULL
     */
    function duplicateZeros(&$arr) {
        $len = count($arr);
        for ($i=0; $i < $len; $i++) {
            if (0 === $arr[$i]) {
                array_splice($arr, $i++, 0, 0);
            }
        } 
        array_splice($arr, $len);
    }
}

Ref: https://leetcode.com/problems/duplicate-zeros/