Fix obsolete funtion in php. closes #2271