Php Function Pass Array Into Functions In R