how to update php in wordpress?

hi,

i read this blog post - https://premium.wpmudev.org/blog/speeding-up-wordpress/?mc_cid=ff682e0413&mc_eid=0d0f0f6fc9#update-core

how do i update my php to the latest version?