Q. What will be the output of the following PHP code ?
Code:<?php
$one = "one";
$two = "two";
print("$one$two");
?>
Dear candidates you will find MCQ questions of PHP here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
<?php
$one = "one";
$two = "two";
print("$one$two");
?>
<?php $one = "one"; $two = "two"; print($one==$two); ?>
<?php $one = "one"; $two = "one"; print($one == $two); ?>
<?php
print("this"."was"."a"."bad"."idea");
?>
<?php
define("GREETING", "PHP is a scripting language");
echo $GREETING;
?>
<?php
define("__LINE__", "PHP is a scripting language");
echo __LINE__;
?>
<?php
define("NEW_GOOD_NAME_CONSTANT", "I have a value");
define("OLD_BAD_NAME_CONSTANT", NEW_GOOD_NAME_CONSTANT);
echo NEW_GOOD_NAME_CONSTANT;
echo OLD_BAD_NAME_CONSTANT;
?>
<?php
define("VAR_NAME","test");
${VAR_NAME} = "value";
echo VAR_NAME;
echo ${VAR_NAME};
?>