diff --git a/Zend/tests/type_declarations/union_types/redundant_types/bool_instead_false_and_true.phpt b/Zend/tests/type_declarations/union_types/redundant_types/bool_instead_false_and_true.phpt index 7386f4aa76735..f95214ce11686 100644 --- a/Zend/tests/type_declarations/union_types/redundant_types/bool_instead_false_and_true.phpt +++ b/Zend/tests/type_declarations/union_types/redundant_types/bool_instead_false_and_true.phpt @@ -8,4 +8,4 @@ function test(): false|true { ?> --EXPECTF-- -Fatal error: Type contains both true and false, bool should be used instead in %s on line %d +Fatal error: Type contains both true and false, bool must be used instead in %s on line %d diff --git a/Zend/tests/type_declarations/union_types/redundant_types/bool_instead_true_and_false.phpt b/Zend/tests/type_declarations/union_types/redundant_types/bool_instead_true_and_false.phpt index 3dacf3e5dbdf5..a54c69f91fe72 100644 --- a/Zend/tests/type_declarations/union_types/redundant_types/bool_instead_true_and_false.phpt +++ b/Zend/tests/type_declarations/union_types/redundant_types/bool_instead_true_and_false.phpt @@ -8,4 +8,4 @@ function test(): true|false { ?> --EXPECTF-- -Fatal error: Type contains both true and false, bool should be used instead in %s on line %d +Fatal error: Type contains both true and false, bool must be used instead in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index cee7ec4361d69..112540929f8bb 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6852,7 +6852,7 @@ static zend_type zend_compile_typename_ex( if ( ((type_mask & MAY_BE_TRUE) && (single_type_mask == MAY_BE_FALSE)) || ((type_mask & MAY_BE_FALSE) && (single_type_mask == MAY_BE_TRUE)) ) { zend_error_noreturn(E_COMPILE_ERROR, - "Type contains both true and false, bool should be used instead"); + "Type contains both true and false, bool must be used instead"); } ZEND_TYPE_FULL_MASK(type) |= ZEND_TYPE_PURE_MASK(single_type); ZEND_TYPE_FULL_MASK(single_type) &= ~_ZEND_TYPE_MAY_BE_MASK;