This message was posted on behalf of Intel Corporation
Thanks for reaching out!
In this case, since you would like to enable features that are not included in the standard build of PHP, the only option left is to build PHP from source. There are several guides on how to do this on OSs like Ubuntu, they use apt-get to install dependencies of PHP. As you know apt-get is not available on Yocto, therefore you will have to either install those dependencies using opkg or build them from source. I suggest you to follow the guide below (taking in consideration what was mentioned above), it explains how to build PHP and how to configure it according to your needs:
I hope this helps.