some usable function for php