How to upgrade PHP without down time?

Hi,

I’m running Ubuntu and installed PHP and all the libraries that are needed with apt-get. How would I be able to upgrade to a newer version without breaking my local host (I’m trying to simulate a live server)?

I was thinking about just removing the PHP folder and installing a newer version but that would mean the “site” would be down until the new packages are installed.

My apologizes I forgot to mention I’m still getting used to the command line.

If apt-get update removes and installs new versions than that answers my question.

apt-get update doesn’t update PHP and its packages?
Been a while since I used installed PHP that way.