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

I think its important to note your first example actually isn't valid. Part of PHP's type-mixing means strings that consist of an integer representation as array keys are automatically casted to int.

  $arr = array(1 => 10, "1" => 11);
  echo $arr[1]; // >> 11


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

Search: