Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down