Home

What is the correct answer?

4

What will be the output of the following PHP code ?
 <?php  define(GREETING, PHP is a scripting language, true);
echo GREETING;
echo
echo GREETING;
?>

A. PHP is a scripting language

B. GREETING
GREEtING

C. GREETING

D. PHP is a scripting language
PHP is a scripting language

Correct Answer :

D. PHP is a scripting language
PHP is a scripting language


Since the third parameter is true in define(GREETING, PHP is a scripting language, true) is true GREETING becomes case insensitive.

Related Questions

Which one of the following is the default PHP session name? Which function displays the web pages most recent modification date? Which one of the following function is useful for producing a timestamp… What will be the output of the following PHP code ? <?php $color1 =… Say you want to calculate the date 45 days from the present date which… What will be the output of the following PHP code ? <?php define('GREETING_TEST',… What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii)… Which of the following must be installed on your computer so as to run… What will be the output of the following PHP code? <?php $cars = array(Volvo,… Which one of the following is the very first task executed by a session… What will be the output of the following PHP code ? <?php define(__LINE__,… What will be the output of the following PHP code? <?php $a1 = array(red,… What will be the output of the following PHP code ? <?php $i = 2;while… The date() function returns ___ representation of the current date and/or… What will be the output of the following PHP code ? <?php define(NEW_GOOD_NAME_CONSTANT,… To create an object and set the date to JUNE 22, 2013, which one of the… Which of the following is/are a PHP code editor?i) Notepadii) Notepad++iii)… What will be the output of the following PHP code? <?php echo (checkdate(4,31,2010)… What will be the output of the following PHP code? If say date is 22/06/2013.… What will be the output of the following PHP code ? <?php $i = 0;while(++$i… What is the default number of seconds that cached session pages are made… What will be the output of the following PHP code ? <?php $color =… What will be the output of the following PHP code ? <?php $color1 =… What will be the output of the following code? If say date is 22/06/2013.… What will be the output of the following PHP code? <?php $age = array(Peter=>35,… What will be the output of the following PHP code ? <?php define(VAR_NAME,test);${VAR_NAME}… If the format is F then which one of the following will be returned? What is the default time(in seconds) for which session data is considered… PHP files have a default file extension of.. What will be the output of the following PHP code ? <?php define('IF',…