Php port for the GAG package