Most of those laws go against the freedom to establish in EU, and as far as I can tell, the law you're referring to is being challenged by the EU because of this. So I don't think EU countries are free to erect laws like that.
Of course, EU does allow exit tax laws and has even mandated some...