Search Results
See Also ¶ ctype_cntrl () - Check for control character (s) ctype_graph () - Check for any printable character (s) except space ctype_punct () - Check for any printable character which is not whitespace or an alphanumeric character IntlChar::isspace () - Check if code point is a space character
Jul 11, 2025 · A ctype_space () function in PHP is used to check whether each and every character of a string is whitespace character or not. It returns True if the all characters are white space, else returns False. Syntax : ctype_space(string text) Parameter Used: text :- It is a mandatory parameter which specifies the string. Return Value: Returns TRUE if every character in text contains white space ...
- Parameters
- Return Value
- Example 2
This function accepts the following parameters − 1. text (required)− A string needs to be tested (checked).
This function returns "true", if every character in the text creates some sort of white space; "false" otherwise.
If the provided string does not consist of the characters that create white space, the PHP ctype_space() function will return false−
À partir de PHP 8.1.0, passer un argument différent d'une chaîne est obsolète. À l'avenir, l'argument sera interprété comme une chaîne de caractères au lieu d'un point de code ASCII. Selon le comportement souhaité, l'argument doit être transtypé en chaîne de caractères ou un appel explicite à chr () doit être effectué.
Dec 31, 2023 · In this tutorial, we will learn about the PHP ctype_space () function with its usage, syntax, parameters, return value, and examples. By IncludeHelp Last updated : December 31, 2023 PHP ctype_space () function The ctype_space () function is a character type (CType) function in PHP, it is used to check whether a given string contains whitespace or not.
ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit ctype_space Supported Versions: PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8 Check for whitespace character(s)
Execute ctype_space Online. Info and examples on ctype_space PHP Function from Character type checking - Variable and Type Related Extensions
