PHP 5.4/5.5 compatibility