PHP RFC: Cookies Having Independent Partitioned State (CHIPS)
- Version: 0.9
- Date: 2025-07-12 (use today's date here)
- Author: Dmitrii Derepko, xepozzd@gmail.com; Niels Dossche, dossche.niels@gmail.com
- Status: Draft (Later in the RFC process “Under Discussion”, “Voting”, and finally “Accepted”, “Declined” or “Implemented”)
- Implementation: https://github.com/php/php-src/pull/12652
Please read https://wiki.php.net/rfc/howto carefully!
Introduction
The elevator pitch for the RFC. The first paragraph of this section will be rendered slightly larger to give it emphasis.
Please write an introduction that helps people by providing concise context and include a representative small code snippet.
<?php setcookie('name', 'value', ['secure' => true, 'partitioned' => true]); ?>
Proposal
Extend setcookie function to make it able to accept one more parameter named “Partitioned” to control CHIPS behavior.
<?php setcookie('name', 'value', ['secure' => true, 'partitioned' => true]); // will result in headers: // Set-Cookie: name=value; secure; Partitioned ?>
Examples
Remember that the RFC contents should be easily reusable in the PHP Documentation. This means, if at all possible, they should be runnable as standalone, self-contained code with the proof-of-concept implementation.
Simple example:
<?php echo "First example"; ?>
Example showing an edge case:
<?php echo "Edge case"; ?>
Backward Incompatible Changes
No breaking changes
Proposed PHP Version(s)
PHP 8.5
RFC Impact
To the Ecosystem
What effect will the RFC have on IDEs, Language Servers (LSPs), Static Analyzers, Auto-Formatters, Linters and commonly used userland PHP libraries?
To Existing Extensions
Will existing extensions be affected?
To SAPIs
Describe the impact to CLI, Development web server, embedded PHP etc.
Open Issues
Make sure there are no open issues when the vote starts!
Future Scope
This section should outline areas that you are not planning to work on in the scope of this RFC, but that might be iterated upon in the future by yourself or another contributor.
This helps with long-term planning and ensuring this RFC does not prevent future work.
Voting Choices
Pick a title that reflects the concrete choice people will vote on.
Please consult the php/policies repository for the current voting guidelines.
Patches and Tests
Links to proof of concept PR.
If there is no patch, make it clear who will create a patch, or whether a volunteer to help with implementation is needed.
Implementation
After the RFC is implemented, this section should contain:
- the version(s) it was merged into
- a link to the git commit(s)
- a link to the PHP manual entry for the feature
References
CHIPS MDN: https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Privacy_sandbox/Partitioned_cookies
Rejected Features
Keep this updated with features that were discussed on the mail lists.
Changelog
If there are major changes to the initial proposal, please include a short summary with a date or a link to the mailing list announcement here, as not everyone has access to the wikis' version history.