adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code?
<?php
    function foo($msg)
    {
        echo "$msg";
    }
    $var1 = "foo";
    $var1("will this work");
    ?>

a.

Error

b.

$msg

c.

0

d.

Will this work

Posted under PHP

Answer: (d).Will this work

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following PHP code?