PHP 7, has released a number of innovations for the PHP language. Also, I noticed that classes can now have methods with keyword names. The strange thing is that classes can not have, but methods can (vixe!)
For example, this is valid in PHP7:
class X{
public function foreach(array $array, \Closure $closure) : boolean {
}
}
My curiosity is: Is this good or bad?
Is it really a benefit to be able to declare the methods name as being of a keyword?
What was the reason why PHP-7 included this new functionality in the language, if it previously generated a Parse Error
?