php activities rules