On 05.08.2016 at 01:37, Sara Golemon wrote:
> On Thu, Aug 4, 2016 at 11:10 AM, Bishop Bettini wrote:
>
>> Or, alternatively, I wonder if a method to convert an exit to an exception
>> would be better:
>
> Eh... That feels less-obvious to me for the reasons you stated in your
> OP. I'm not convin
Hi!
having a complete trace from an exception would be great:
function shutdown() {
$e = new Exception();
echo $e->getTraceAsString();
}
function test() {
exit;
}
register_shutdown_function('shutdown');
test();
gives:
#0 [internal function]: shutdown()
#1 {main}
Regards
Thomas
Bishop B
On Thu, Aug 4, 2016 at 11:10 AM, Bishop Bettini wrote:
> I'm wondering if the shutdown functions could access telemetry:
>
> register_shutdown_function(function () {
>
> $context = shutdown_get_context();
>
> /** array ( 'exit' => array ('file' => '/path/to/Foo.php', 'line' =>
> 242, 'mes
Hi Bishop,
It would be good to preserve contexts to make debugging easier.
> I wonder if a method to convert an exit to an exception
> would be better:
That doesn't sound like a good plan. There are times when exiting
almost straight away is the correct thing to do. If we changed exit()
to not d
On Thu, Aug 4, 2016 at 12:11 PM Bishop Bettini wrote:
> Hi!
>
> exit (and its doppelganger die) is a hard stop to the engine and there is
> little telemetry provided about the circumstances (file, line, message, and
> code). In source I control, exit is no big deal: I don't use exit! But in
> lib
Hi!
exit (and its doppelganger die) is a hard stop to the engine and there is
little telemetry provided about the circumstances (file, line, message, and
code). In source I control, exit is no big deal: I don't use exit! But in
library code, exit can be frustrating.
register_shutdown_function + d