What will be the output of the following PHP code?

🎲 Try a Random Question  |  Total Questions in Quiz: 11  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
PHP Programming Basics Practice Test: Constants in PHP — practice the complete quiz, review flashcards, or try a random question.

In PHP, a constant is a name for a value that cannot be changed during the execution of a script. Constants are similar to variables, but once defined, they cannot be changed or undefined.  Here are some rules for constants in PHP: Constants are case-sensitive and are usually written in uppercase. Constants defined using the define() function may be case-insensitive prior to PHP 8.0.0. Constants are automatically global and can be used across the entire script. Constants can be defined on a per-class basis. Class constants can be redefined by a child class. However, as of PHP 8.1.0,... Show more

What will be the output of the following PHP code?<br><?php<br>define("NEW_GOOD_NAME_CONSTANT", "I have a value");<br>define("OLD_BAD_NAME_CONSTANT", NEW_GOOD_NAME_CONSTANT);<br> <br>echo NEW_GOOD_NAME_CONSTANT;<br>echo OLD_BAD_NAME_CONSTANT; <br>?>