Why is there a distinction made between the variable $callback and the function $callback() in the PHP code?

The distinction is made between the variable $callback and the function $callback() because in PHP, functions can be assigned to variables. If you want to store a function in a variable and then call it later, you should use $callback without parentheses. If you want to execute the function immediately, you should use $callback() with parentheses.

// Assigning a function to a variable
$callback = function() {
    echo "Hello, World!";
};

// Calling the function stored in the variable
$callback();