PHP api batch execution