how to ensure compatible to PHP 5.4+