PHP5.2 compatibility