Call to undefined function endsWithNum()