Commit 0806cabd055 for php

commit 0806cabd0552abfa329b0ab88d96684b691c2bde
Author: Gina Peter Banyard <girgias@php.net>
Date:   Thu Oct 1 08:44:52 2026 +0100

    standard: use new zend_object_copy() API

diff --git a/ext/standard/assert.c b/ext/standard/assert.c
index 618f69a2cf7..f63ab7f8b33 100644
--- a/ext/standard/assert.c
+++ b/ext/standard/assert.c
@@ -195,8 +195,7 @@ PHP_FUNCTION(assert)
 	}

 	if (description_obj) {
-		GC_ADDREF(description_obj);
-		zend_throw_exception_internal(description_obj);
+		zend_throw_exception_internal(zend_object_copy(description_obj));
 		RETURN_THROWS();
 	}

diff --git a/ext/standard/io_poll.c b/ext/standard/io_poll.c
index dd0b27ae006..fd20426668d 100644
--- a/ext/standard/io_poll.c
+++ b/ext/standard/io_poll.c
@@ -834,8 +834,7 @@ PHP_METHOD(Io_Poll_Context, add)

 	/* Store in our watchers map */
 	zval watcher_zv;
-	ZVAL_OBJ(&watcher_zv, &watcher->std);
-	GC_ADDREF(&watcher->std);
+	ZVAL_OBJ_COPY(&watcher_zv, &watcher->std);
 	zend_hash_index_add_new(intern->watchers, (zend_ulong) fd, &watcher_zv);

 	watcher->active = true;
@@ -907,11 +906,7 @@ PHP_METHOD(Io_Poll_Context, wait)
 		if (watcher) {
 			watcher->triggered_events = events[i].revents;

-			zval watcher_zv;
-			ZVAL_OBJ(&watcher_zv, &watcher->std);
-			GC_ADDREF(&watcher->std);
-
-			add_next_index_zval(return_value, &watcher_zv);
+			add_next_index_object(return_value, zend_object_copy(&watcher->std));
 		}
 	}