-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Invoke destructors during bailout #19080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep the trailing newline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep a trailing newline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems more complicated than you need
<?php class StatCounter { public function __construct(private array $stats) {} public function __destruct() { echo "Sending stats: ".json_encode($this->stats)."\n"; } } $stats = new StatCounter(['test' => 1, 'test2' => 1]); set_time_limit(1); while (1);
should do the same thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test is limited to one second, I don't think that counts as slow
Closes #18418.