Re-fixed bug #66469
Fixed previous commit may delete unwanted cookies. Sync tests from upper branches.
Fixed previous commit may delete unwanted cookies.
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Fixed previous commit may delete unwanted cookies.
  Re-fixed bug #66469
Merge branch 'PHP-5.6'

* PHP-5.6:
  Fixed previous commit may delete unwanted cookies. Sync tests from upper branches.
  Re-fixed bug #66469