Reputation: 4435
In this OOP tutorial, I noticed the following code:
public function validate(Array $data, Array $rules){}
My question is if that is the same as:
public function validate(array $data, array $rules){}
In the PHP.net documentation, I could find a reference only to the second form.
Upvotes: 4
Views: 3336
Reputation: 29
Short answer: PHP constructs, class names, functions and user-defined functions are case-insensitive.
Upvotes: 0
Reputation: 699
They are both the same. Some IDEs only recognize one of the forms, though. (Just like stackoverflow itself, which only stylizes Array
Upvotes: 6
Reputation: 709
Javascript can only usw "Array". Using "array" in PHP is no problem, but if you want do use Javascript too, it will cause an error.
Upvotes: -5