Various useful things in PHP