Added php debug functions