This is emproved version of the phpari with new interfaces