Various reusable PHP helpers.