'Samesite=Strict for PHP cookie doesn't work

When I'm setting a cookie in PHP I can't get the cookie with the value samesite=Strict. Without the parameter samesite the cookie is set, but as soon as I add the parameter samesite to setcookie the cookie isn't set.

The php version I'm using is 7.4.3

setcookie('login', ''.$nonce.'', strtotime('NOW+1DAYS'), "/", "", "true", "true", "Strict");

Does anyone know why this isn't working?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source