add common php functions