Javascript Distinct Array Of Objects Php Compiler