?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
define("VAR_NAME","test");
${VAR_NAME} = "value";
echo VAR_NAME;
echo ${VAR_NAME};
?>
<?php
define("VAR_NAME","test");
${VAR_NAME} = "value";
echo VAR_NAME;
echo ${VAR_NAME};
?>
Answer & Solution
Correct Answer:
Option
C
${VAR_NAME} creates a new variable which is not same as VAR_NAME.
Join the Discussion
Login to post a comment or share your explanation.
Login