What is the difference between defining constants and variables in PHP?

Defining constants in PHP is done using the define() function, and once a constant is defined, its value cannot be changed throughout the script. On the other hand, variables in PHP are declared using the $ symbol and can have their values updated or modified during the script execution.

// Defining a constant
define("PI", 3.14);

// Defining a variable
$radius = 5;
$area = PI * ($radius * $radius);

echo "The area of the circle is: " . $area;