A useful snippet for php.