If you're here as "an illegal immigrant" you won't get any benefits
It's not quite that simple though, is it? In the case of non EU immigrants there's the issue of when, realistically, they become "illegal" - is it after the endless application/appeals process, or are others correct in saying they're illegal by default if they're wilfully ignored the rules about the first safe country reached?
There's also the help given while immigrants' status is decided, and even after they've been refused residency - not the full raft of benefits, admittedly, but help nevertheless: www.gov.uk/asylum-support
Then of course there are NHS/education costs and even the money spent by charities which receive government funding ... not strictly "benefits" in the way it was meant, perhaps, but public money all the same
As I said, it really isn't as straightforward as "they get nothing"