In theory, it is possible to create a class, an object which can not be removed by unset()?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You mean
unset()and object? Not only in theory. It’s possible in practice. In fact, that part of why they invented the__destruct()magic method.EDIT by comments:
No, it’s impossible to implement a class or an object which cannot be removed by
unset().