Commit 28dab5fafb1 for php.net
commit 28dab5fafb18ef3757cd56639c3238c8ac8b1f9f
Author: Calvin Buckley <calvinb@php.net>
Date: Wed Jul 22 17:38:11 2026 -0300
Remove docref1/docref2 (#22742)
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index 666d7830a5f..6e8444f2689 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -80,6 +80,9 @@ PHP 8.6 INTERNALS UPGRADE NOTES
directly.
. The {_}php_stream_fopen_with_path() functions have been removed as they are
unused.
+ . The php_error_docref1() and php_error_docref2() functions have been
+ removed, instead rely on the error_include_args INI option to show the
+ arguments to functions in a consistent manner.
- Changed:
. Internal functions that return by reference are now expected to
diff --git a/main/main.c b/main/main.c
index e29770a909e..22304cad1b4 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1258,35 +1258,6 @@ PHPAPI ZEND_COLD void php_error_docref_unchecked(const char *docref, int type, c
}
/* }}} */
-/* {{{ php_error_docref1 */
-/* See: CODING_STANDARDS.md for details. */
-PHPAPI ZEND_COLD void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...)
-{
- va_list args;
-
- va_start(args, format);
- php_verror(docref, param1, type, format, args);
- va_end(args);
-}
-/* }}} */
-
-/* {{{ php_error_docref2 */
-/* See: CODING_STANDARDS.md for details. */
-PHPAPI ZEND_COLD void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...)
-{
- char *params;
- va_list args;
-
- spprintf(¶ms, 0, "%s,%s", param1, param2);
- va_start(args, format);
- php_verror(docref, params ? params : "...", type, format, args);
- va_end(args);
- if (params) {
- efree(params);
- }
-}
-/* }}} */
-
/* {{{ php_html_puts */
PHPAPI void php_html_puts(const char *str, size_t size)
{
diff --git a/main/php.h b/main/php.h
index a0c639810b8..7ae6dad0f30 100644
--- a/main/php.h
+++ b/main/php.h
@@ -305,10 +305,6 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
PHPAPI ZEND_COLD void php_error_docref_unchecked(const char *docref, int type, const char *format, ...);
-PHPAPI ZEND_COLD void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...)
- PHP_ATTRIBUTE_FORMAT(printf, 4, 5);
-PHPAPI ZEND_COLD void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...)
- PHP_ATTRIBUTE_FORMAT(printf, 5, 6);
END_EXTERN_C()
#define zenderror phperror