Technically this is NOT a PHP problem, it is a sendmail problem. Since PHP can work with many different mail transfer agents (hereafter referred to as MTAs) there is nothing to be done in PHP to fix it.
I run RedHat Linux, which uses sendmail, so my fix is to download the latest sendmail package from a redhat mirror.
Or, I could uninstall sendmail and install another MTA of my choice, either from source or a package if I can find one.
PHP just uses sendmail, sendmail isn't integrated into it.