I have a class called Validation
and a method named array
. Since array
is a builtin function in PHP its throwing an error
Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting identifier (T_STRING) in D:\xampp\htdocs\mvc\app\validation.php on line 82
Is there a way I can use array as a method name?
//This is a class
class Validation extends Controller{
//This is a method
public function array( $field, $name ){
}
}