What Will Be The Output Of The Following Php Codep Pre Langphp #487
What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> <?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; ?> </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs107 PHP: Hypertext Preprocessor. It can also be found in gs gs107 PHP Constants - PHP Constants - Quiz No.1.
What will be the output of the following PHP code?
<?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; ?>
I have a value
I have a valueI have a value
ERROR
I have a valueNEW_GOO_NAME_CONSTANTS