<?php
define("GREETING", "Hello, world!");
echo GREETING . "<br>"; // outputs "Hello, world!"
echo greeting . "<br>"; // outputs an undefined constant notice and "greeting" string
?>
Hello, world!
greeting
define()
` function is used to define a constant named `GREETING` with the value `"Hello, world!"`. echo
` statement attempts to output the value of the constant `greeting` using an incorrect case. Since the constant `greeting` has not been defined, PHP will output an "undefined constant" notice and the string "greeting".define("GREETING", "Hello, world!");
` and `define("greeting", "Hi, there!");
` will define two separate constants with different values.