The most easiest and clean way to unset a cookie in PHP
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.
Today I learned: The easiest way of unsetting a cookie in PHP is by setting its value to "false". Period. #PHP #TidBits pic.twitter.com/gjcODyttOD
— Amit Merchant (@amit_merchant) November 12, 2019
Like this article?
Buy me a coffee👋 Hi there! I'm Amit. I write articles about all things web development. You can become a sponsor on my blog to help me continue my writing journey and get your brand in front of thousands of eyes.