Added cut down general PHP routines