Commit 610361845bf for php.net
commit 610361845bfb16a2cf5a107205eb9c5f59e1c949
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date: Fri Jan 2 17:06:56 2026 +0100
Remove unnecessary optimization FIXME
As the comment suggests, the return value of frameless calls is rarely not used.
When it isn't used (and isn't refcounted) the FREE is already elided by the
optimizer.
Closes GH-20819
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 5eba2ec1366..0cb4ee3740f 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -816,8 +816,6 @@ static void zend_do_free(znode *op1) /* {{{ */
} else {
/* Frameless calls usually use the return value, so always emit a free. This should be
* faster than checking RETURN_VALUE_USED inside the handler. */
- // FIXME: We may actually look at the function signature to determine whether a free
- // is necessary.
zend_emit_op(NULL, ZEND_FREE, op1, NULL);
}
} else {