Isn't 0 a magic number in $dependency[0]? Associative array is preferable here  imo.