Can the visibility of a cookie set in a PHP script be changed to make it immediately accessible?

When setting a cookie in a PHP script, the visibility (i.e., whether the cookie is accessible only by the server-side script or by client-side JavaScript as well) is determined by the 'httponly' parameter. To make a cookie immediately accessible to client-side JavaScript, you can set the 'httponly' parameter to false.

setcookie('cookie_name', 'cookie_value', time() + 3600, '/', '', false, false);