Why does array === array equal true in PHP?
php
Solution
Simple answer: `array("asdf") === array("asdf")` returns true because the two arrays being compared:
- have the same key/value pairs,
- each of the same types, and
- in the exact same order.
That's what `array() === array()` means.
Good Read
Array Operators
Problem
In php `===` is the identical comparison operator i.e. checks if two variables have equal values and are of the same type. But why `array("asdf") === array("asdf")` returns true? I guess both of these create new arrays with same contents(please correct me if I am wrong).