Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

  [] instead of {} for a map
PHP uses [] for both list and map types.

I don't think there's any difference between the two types in PHP. All lists are maps.



But we're talking syntax, not behavior. There's no reason they couldn't use {} to indicate maps and [] to indicate lists, even if they're the same data type. The point of this language is to be a cleaner syntax on top of PHP, so syntactical sugar like that is a Good Thing (TM).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: