setcookie("myCookie", "Hello World", time() + 3600); // Package Library: PHP 4 or later
setcookie("userName", "John", time() + (86400 * 1), "/"); // Package Library: PHP 4 or later
setcookie("myCookie", "Hello World", [ 'expires' => time()+3600, 'path' => '/', 'domain' => 'example.com', 'secure' => true, 'httponly' => true, 'samesite' => 'Strict' ]); // Package Library: PHP 7.3 or laterThe package library for PHP Cookie put is PHP itself. The setcookie() function is included in PHP 4 or later versions. It can also be used with the latest versions (PHP 8).