General update

Added some newer PHP features and dropped support for PHP older than
5.3.7.