Remove Commas from very large integers (PHP)

input: 1,234,567
output: 1234567 

function remove_commas ($data) {
     return (int) str_replace(',' , '', $data);
}