Keyword
PHP has a list of keywords, which are also called reserved names. Those are names used with some functions or operators.
Keywords are not allowed in function, constant, class, interface, enum and trait names. They are allowed in method, properties, variables and class constant names.
While legit, it is usually recommended to avoid using PHP keywords as identifiers, so as to prevent confusion.
<?php
class Elephpant {
function array() {
return array();
}
}
print_r((new elephpant)->array());
class Herd {
const array ARRAY = array(); // possible confusion here
}
?>