PHP - Classes and Objects
Identify the error in this PHP class:
class Demo {
function __destruct($msg) {
echo $msg;
}
}class Demo {
function __destruct($msg) {
echo $msg;
}
}__destruct cannot accept any parameters.__destruct($msg) with a parameter, which is invalid and causes a syntax error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions