πŸ“Š PHP
Q. find the output of below code
Code:
<?php
class cppbuzz {
    public $var;

    function __construct() {
        return "cppbuzz";
    }
}

$cppbuzz = new cppbuzz;
echo $cppbuzz->var;
?>
  • (A) cppbuzz
  • (B) "cppbuzz"
  • (C) ""
  • (D) Nothing is printed
πŸ’¬ Discuss
βœ… Correct Answer: (D) Nothing is printed

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
115198
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
83%
Success Rate