PHP Functions for pythin