I have PHP application, that runs about 2-3 minutes before it return something to browser (some database processing stuff).
I want to know, if I can change php file with it while script is running. I assume, there is a buffer in Apache/PHP.
I have situation like this:
// This is index.php
include "DatabaseController.php"; // class inside, I create instance at start
include "ImagesController.php"; // class inside, I create instance at start
include "helpers.php"; // there are just functions, no classes
$db = new Database();
$img = new Images();
// for loop doing job here (2-3 minutes)
// end
What will happen, when I replace "DatabaseController.php" file while script is running?
I tried to test it, and it looks like "job part" is still using old version of DatabaseController, when I replace.
But... what will happen, when I replace "helpers.php" file? It contains only functions, without classes that may be instantiated at the beginning of script.
How this buffering works in general?
includehappens, it will of course see the new file.