logoalt Hacker News

mdavid626today at 4:44 PM1 replyview on HN

If I have an “array” and can do array[0] to get first item, but when I filter this array and array[0] throws an error, that’s super weird. What is the meaning of [] or what is an array even? The language forces me to understand how it is implemented under the hood. That’s exactly what the author says: leaky abstraction.


Replies

mfondatoday at 5:00 PM

An “array” in PHP is an ordered map.

show 1 reply