PHP: properly code complete when inside a square brackets