Is it OK to perform a mysqli query on a class __destruct function?
I heard somewhere it will not always finish the query or it won’t work as expected.
For example:
class stackoverflow{
function a() {
}
function b() {
}
function __destruct() {
//mysqli query here
}
}
There’s no reason why it shouldn’t work as expected. However, it would help if you explained why you wanted to do so in the first place, there may be a better solution than what you have in mind