PHP Error: Function name must be a string

php

Solution

It should be `$_COOKIE['name']`, not `$_COOKIE('name')`

`$_COOKIE` is an array, not a function.

Problem

I added the following lines to the top of my PHP code, but it throws an error: Fatal error: Function name must be a string in /home/reg.php on line 2 ``` <?php if ($_COOKIE('CaptchaResponseValue') == "false") { header('location:index.php'); return; } ?> ``` I tried: `$_COOKIE("CaptchaResponseValue")`. The cookie is successfully set and is available. Why is it giving me an error when I am using `$_COOKIE`?

Original source