Closed bobbingwide closed 4 years ago
The actual problem with PHP_SAPI having different values was an environmental problem with SiteGround's hosting. Obviously a PHP constant should never change once set. The logic could be useful in the future for finding when a constant changes from not being defined to defined.
The logic may also be extended to look for changes to variables.
I'm going to close this as a WontFix for the time being. The original reason for developing the code to "Add logic to watch for a constant changing" has gone away.
Note: The code's not called anymore. It's commented out.
The logic could be useful in the future for finding when a constant changes from not being defined to defined. The logic may also be extended to look for changes to variables.
That's a nice idea. But I'm going to close it anyway. For v3.0.0 at least. Xdebug's probably a much better solution if you want to watch variables.
It shouldn't happen but I'm experiencing a situation where the value of the PHP_SAPI constant changes from "cli" to "cgi-fcgi". I need to find out what's doing this. See bobbingwide/oik-batch/issues/19
Propsed solution