79414213

Date: 2025-02-05 09:22:49
Score: 2.5
Natty:
Report link

How about

$aList = empty($aString) ? [] : explode(',', $aString)

However, the comment by @bassxzero using preg_split also looks nice.

Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • User mentioned (1): @bassxzero
  • Starts with a question (0.5): How
  • Low reputation (0.5):
Posted by: Peter Rullmann