<?php
print_r(http_parse_cookie("foo=bar; bar=baz; path=/; domain=example.com; comment=; secure", 0, array("comment")));
?>
Результат выполнения данного примера:
stdClass Object
(
[cookies] => Array
(
[foo] => bar
[bar] => baz
)
[extras] => Array
(
[comment] =>
)
[flags] => 16
[expires] => 0
[path] => /
[domain] => example.com
)