How long do PHP static variables persist, i.e. how long does a "PHP run" persist? With say a command line program there is a defined start and end, but in web w/ AJAX I don't know how to define this.
Here are 3 ways I've seen a PHP script started.
- User (Requesing a PHP page)
- Javacript calling PHP (AJAX)
- PHP calling more PHP via a header()
In my actual application I have javascript call a php script via AJAX that script uses the header() to reload the site. This would be consideredt two different runs. Each has their own static variables that do not relate.