The most easiest and clean way to unset a cookie in PHP

Amit Merchant · November 12, 2019 ·

Today, I got to know about a very clean looking and intuitive way of unsetting/deleting a cookie from client’s browser using PHP. No “setting the expiry time in past” bullshit.

Learn the fundamentals of PHP 8 (and 8.1), the latest version of PHP, and how to use it today with my new book PHP 8 in a Nutshell. It's a no-fluff and easy-to-read guide to the latest features and nitty-gritty details of PHP 8. So, if you're looking for a quick and easy way to PHP 8, this is the book for you.

👋 Hi there! I'm Amit. I write articles about all things web development. If you like what I write and want me to continue doing the same, I would like you buy me some coffees. I'd highly appreciate that. Cheers!

Comments?