79187340

Date: 2024-11-14 03:48:48
Score: 0.5
Natty:
Report link

The best method to check if array is associative according to AI and AI deems it as a bulletproof method is

return is_array($array) && array_keys($array) !== range(0, count($array) - 1);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Evan TOder