PHP | IntlChar::isWhitespace() Function Last Updated : 28 Mar, 2023 Comments Improve Suggest changes Like Article Like Report The IntlChar::isWhitespace() function is an inbuilt function in PHP which is used to check whether the given input character is a WhiteSpace character or not according to ICU. IntlChar access number utility function and used to access the information about Unicode Characters. The White Space character is considered to ICU whitespace character if and only if it satisfies one of the following criteria: It is a Unicode Separator character (categories "Z" = "Zs" or "Zl" or "Zp") but is not also a non-breaking space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP).U+000A LINE FEED .U+000B VERTICAL TABULATION.U+000C FORM FEED.U+000D CARRIAGE RETURN.U+001C FILE SEPARATOR.U+001D GROUP SEPARATOR.U+001E RECORD SEPARATOR.U+001F UNIT SEPARATOR.U+0009 HORIZONTAL TABULATION. Syntax: bool IntlChar::isWhitespace( $codepoint ) Parameters: This function accepts s single parameter $codepoint which is mandatory. The input parameter is a character or integer value, which is encoded as a UTF-8 string. Return Value: If $codepoint is a whiteSpace character according to ICU then it returns True, otherwise return False. Below programs illustrate the IntlChar::isWhitespace() Function in PHP: Program 1: PHP <?php // PHP code to illustrate // IntlChar::iswhitespace() function //Input Capital Letter var_dump(IntlChar::iswhitespace("R")); //Input Small Letter var_dump(IntlChar::iswhitespace(" r ")); //Input Whitespace Character "\n " var_dump(IntlChar::iswhitespace("\n")); //Input encoded string var_dump(IntlChar::iswhitespace("\u{00A0}")); //Input Whitespace Character var_dump(IntlChar::iswhitespace(" ")); ?> Output: bool(false) NULL bool(true) bool(false) bool(true) Program 2: PHP <?php // PHP code to IntlChar::iswhitespace() // function // Declare an array $arr $arr = array("\t", "\n", "^", "\r", "G\t"); // Loop run for every array element foreach ($arr as $val){ // Check each element as code point data var_dump(IntlChar::iswhitespace($val)); } ?> Output: bool(true) bool(true) bool(false) bool(true) NULL Related Articles: IntlChar::isalpha() FunctionIntlChar::isbase() FunctionIntlChar::isblank() FunctionIntlChar::iscntrl() Function References: http://php.net/manual/en/iswhitespace Comment More infoAdvertise with us Next Article PHP | IntlChar::isWhitespace() Function J jit_t Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Intl Similar Reads PHP | IntlChar::isUWhiteSpace() Function The IntlChar::isUWhiteSpace() function is an inbuilt function in PHP which is used to check whether the given input character is a WhiteSpace Unicode character or not. IntlChar accesses a number utility function and used to access the information about Unicode Characters. Syntax: bool IntlChar::isUW 2 min read PHP | IntlChar::isspace() Function The IntlChar::isspace() function is an inbuilt function in PHP which is used to check whether the given input character is a space character or not. Syntax: bool IntlChar::isspace( $codepoint ) Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter is 2 min read PHP | IntlChar istitle() Function The IntlChar::istitle function is an inbuilt function in PHP which is used to check whether the input character code point is a titlecase letter or not. In True cases, the characters with the general category are "Lt" (titlecase letter).Syntax: bool IntlChar::istitle( $codepoint ) Parameters: This f 2 min read PHP | IntlChar::isIDPart() Function The IntlChar::isIDPart() function is an inbuilt function in PHP which is used to check whether the given input character is permissible in an identifier or not. It is True for characters with general category "L" (Letters), "Nd" (Decimal digits), "Nl" (letters numbers), "Mc" and "Mn"(Combining marks 2 min read PHP IntlChar::isbase() Function PHP IntlChar::isbase() function is an inbuilt function in PHP that is used to check whether the given input data is a base character or not. If the specified code point is a base character then it returns TRUE for general categories "L" (Letters), "N" (numbers), "Mc" (spacing combining marks), and " 2 min read Like