Commit da4185ab462 for php.net

commit da4185ab462a417b6c3b550d463afd15e4f6ac4f
Author: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Date:   Thu Apr 9 20:26:54 2026 +0800

    Use zend_str_has_nul_byte instead of memchr (#21680)

diff --git a/ext/session/session.c b/ext/session/session.c
index 51ab3922e0b..5094e7412a8 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -641,7 +641,7 @@ static PHP_INI_MH(OnUpdateSaveDir)

 	/* Only do the open_basedir check at runtime */
 	if (stage == PHP_INI_STAGE_RUNTIME || stage == PHP_INI_STAGE_HTACCESS) {
-		if (memchr(ZSTR_VAL(new_value), '\0', ZSTR_LEN(new_value)) != NULL) {
+		if (zend_str_has_nul_byte(new_value)) {
 			return FAILURE;
 		}

diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 59e2bd41680..75d88cd5415 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -387,7 +387,7 @@ static PHP_INI_MH(OnUpdateCacheDir)
 	if (stage == PHP_INI_STAGE_RUNTIME || stage == PHP_INI_STAGE_HTACCESS) {
 		char *p;

-		if (memchr(ZSTR_VAL(new_value), '\0', ZSTR_LEN(new_value)) != NULL) {
+		if (zend_str_has_nul_byte(new_value)) {
 			return FAILURE;
 		}