Well there are several ways.
1. You can install apache, php, pdo on your local desktop using the downloadable windows versions. And develope locally before sending it live. (which has some limitations is still a popular way)
2. You can set up a devopment environment (as i do with my scripts) using one of your cPanel accounts and a add-on or subdomain and then limit access to that area.
2a. You can also do #2 in conjunction with using a development (what i call a version control) script which will give you some features as you develope, including change logs, a diff feature which compares two files and shows you the diff between then, and a file sign in sign out feature in the event you have multiple people working on the same script.
I prefer 2 and 2a in my script dev. I actually have written a version controll system but due to my motorcycle accident and the fact that i need to update it, i took it off the market until i an get enough stamina back to get that poject done, as i am not doing much dev at this time.
It all depends on how you want to do it. But you cant do it by installing it to localhost. It has to be setup in a domain or subdomain.