Cleaned php extension and arranged tests