Issue #3328456 by xjm, dimitriskr, murilohp, smustgrave: Replace substr($a, 0, $i) with str_starts_with() (cherry picked from commit 4ca4dbaa)