adplus-dvertising
frame-decoration

Question

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

a.

error

b.

$msg

c.

0

d.

will this work

Posted under Functions in PHP 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. hat will be the output of the following PHP code?

Similar Questions

Discover Related MCQs