Edit report at https://bugs.php.net/bug.php?id=55440&edit=1
ID: 55440 User updated by: nicolas dot grekas+php at gmail dot com Reported by: nicolas dot grekas+php at gmail dot com Summary: Internal state of the execution engine -Status: Open +Status: Closed Type: Feature/Change Request Package: *General Issues PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Rethinking about it, this is a bad idea, because it would expose this internal behavior to userland. It would be a lot better to remove these specials cases: they are not mandatory, only an artifact of the current implementation of the engine. So if that happen on day, the function would have to be removed, causing potential BC break. Previous Comments: ------------------------------------------------------------------------ [2011-08-17 13:30:57] nicolas dot grekas+php at gmail dot com Description: ------------ While developing in PHP, I've learned that the execution engine is sometimes set in special states that alter its capabilities. As far as I know, their is no way for us developers to write code that test for one of these particular state and branch code appropriately. By "special state", I mean : - execute/compile stage, where for eg autoloading doesn't work (http://bugs.php.net/42098), - outside/inside output buffering handler, where for eg print_r($v, true) doesn't work (http://bugs.php.net/55428), - before/after "shutdown time", where for eg uncatched exceptions generate the cryptic "Fatal error: Exception thrown without a stack frame in Unknown on line 0" and set_exception_handler() is disabled. Adding a centralized way to check for these states is maybe a good idea ? For example, get_engine_state( void ) would return a bit field, each bit for each possible state? ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55440&edit=1