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("VAR_NAME","test"); <br>${VAR_NAME} = "value"; <br>echo VAR_NAME;<br>echo ${VAR_NAME}; <br>?>