PHP5.4 compatibility