Does PHP compile the scripts every time they run? Or does it store a compiled version once the script runs for the first time and then after it runs only the compiled version??
Yes, it compiles and then runs. There are however a few different engines to make this speedier by caching scripts like Zend, APC, ionCube and Bware.