gs gs107 PHP Constants - PHP Constants - Quiz No.1
gs gs107 PHP: Hypertext Preprocessor Quiz
This quiz belongs to book/course code gs gs107 PHP: Hypertext Preprocessor of gs organization. We have 73 quizzes available related to the book/course PHP: Hypertext Preprocessor. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic PHP Constants. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
<?php define("GREETING", "PHP is a scripting language", true); echo GREETING; echo "<br>"; echo GREETING; ?>
GREETING GREEtING
PHP is a scripting language PHP is a scripting language
<?php define("GREETING", "PHP is a scripting language"); echo $GREETING; ?>
<?php define('GREETING_TEST', 'PHP is a scripting language', true); echo GREETING_TESt; $changing_variable = 'test'; echo constant('GREETING_' . strtoupper($changing_variable)); ?>
PHP is a scripting language PHP is a scripting language
GREETING_TESt PHP is a scripting language
PHP is a scripting language GREETING_TEST
GREETING_TESt GREETING_TEST
<?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}; ?>
<?php class myObject { } define('myObject::CONSTANT', 'test'); echo myObject::CONSTANT; ?>