From f8bcfe208dcdc0d0df23719ec70c83892724a6f2 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Wed, 19 Jun 2024 18:49:46 +0900 Subject: [PATCH] Clarify return value of strcmp() and friends https://github.com/php/doc-en/commit/40364a64d707d6ec49f6870045807c93e09dba6d --- appendices/migration82/other-changes.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/appendices/migration82/other-changes.xml b/appendices/migration82/other-changes.xml index d2ed7dfc3a..600c53f6fb 100644 --- a/appendices/migration82/other-changes.xml +++ b/appendices/migration82/other-changes.xml @@ -1,6 +1,6 @@ - + その他の変更 @@ -50,7 +50,10 @@ strcmp, strcasecmp, strncmp, strncasecmp, substr_compare は、 - -1, 0, 1 を返すようになりました。 + 比較対象の文字列の長さが等しくないときに strlen($string1) - strlen($string2) を返すことが保証されなくなり、 + -11 を返すようになりました。 + 返される具体的な値に依存する代わりに、これらの関数の戻り値は + 0 と比較すべきです。