Commit 4822a5d2a81 for php

commit 4822a5d2a816fa338e0a43efedfdfbde663609f2
Author: Weilin Du <weilindu@php.net>
Date:   Sun Oct 25 00:30:26 2026 +0800

    [skip ci] Add policy for duplicate PRs (#24613)

diff --git a/AGENTS.md b/AGENTS.md
index 2cf3915754b..a09b5681ec2 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,5 +1,12 @@
 # Agents

+## Pull requests
+
+Before starting work and again before opening a pull request, check for existing
+pull requests as described in [CONTRIBUTING.md](CONTRIBUTING.md#pull-requests).
+Do not open a duplicate of an existing pull request, unless you have a very good
+reason to do it.
+
 ## Vulnerability reports

 When scanning php-src for vulnerabilities, please respect our security policy
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 4767a0eb0fc..9e6eda0e88d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -34,6 +34,19 @@ had several contributions accepted, commit privileges are often quickly granted.
 PHP welcomes pull requests to [add tests](#writing-tests), fix bugs and to
 implement RFCs. Please be sure to include tests as appropriate!

+Before starting work and again before submitting a pull request, search the
+[existing pull requests](https://github.com/php/php-src/pulls?q=is%3Apr),
+including closed ones, for the same issue or change. Check the bug report for
+linked pull requests, and search by issue number, relevant function names and
+keywords.
+
+If an open pull request already addresses the problem, help test or review it
+to make it better instead of opening an equivalent pull request.
+
+When multiple pull requests provide equivalent fixes of comparable quality,
+we follow a first-come, first-served principle. We prefer the first correct
+pull request.
+
 By submitting a pull request, you certify that you have the necessary rights
 to submit the work, that the work does not violate any third-party rights
 (including those of your employer, if applicable), and that you license your