Function __global->cms_eatcookie

Definitions

sources/global3.php

  • Deletes a cookie (if it exists), from within the site's cookie environment.This should rarely ever be used as it causes large headers and does not work on httpOnly, Secure, nor sameSite cookies. Use cms_setcookie instead.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$name string No No required parameter N/A N/A The name of the cookie

Returns

  • The result of the PHP setcookie command
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Deletes a cookie (if it exists), from within the site's cookie environment.This should rarely ever be used as it causes large headers and does not work on httpOnly, Secure, nor sameSite cookies. Use cms_setcookie instead.
 *
 * @param  string $name The name of the cookie
 * @return boolean The result of the PHP setcookie command
 */

function cms_eatcookie(string $name) : bool