add php mode support