<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Check if code point is a "blank" or "horizontal space" character</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="intlchar.isbase.html">IntlChar::isbase</a></div> <div class="next" style="text-align: right; float: right;"><a href="intlchar.iscntrl.html">IntlChar::iscntrl</a></div> <div class="up"><a href="class.intlchar.html">IntlChar</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="intlchar.isblank" class="refentry"> <div class="refnamediv"> <h1 class="refname">IntlChar::isblank</h1> <p class="verinfo">(PHP 7)</p><p class="refpurpose"><span class="refname">IntlChar::isblank</span> — <span class="dc-title">Check if code point is a "blank" or "horizontal space" character</span></p> </div> <div class="refsect1 description" id="refsect1-intlchar.isblank-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">bool</span> <span class="methodname"><strong>IntlChar::isblank</strong></span> ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$codepoint</code></span> )</div> <p class="para rdfs-comment"> Determines whether the specified code point is a "blank" or "horizontal space", a character that visibly separates words on a line. </p> <p class="para"> The following are equivalent definitions: <ul class="simplelist"> <li class="member"> <strong><code>TRUE</code></strong> for Unicode White_Space characters except for "vertical space controls" where "vertical space controls" are the following characters: U+000A (LF) U+000B (VT) U+000C (FF) U+000D (CR) U+0085 (NEL) U+2028 (LS) U+2029 (PS) </li> <li class="member"> <strong><code>TRUE</code></strong> for U+0009 (TAB) and characters with general category "Zs" (space separators) except Zero Width Space (ZWSP, U+200B). </li> </ul> </p> </div> <div class="refsect1 parameters" id="refsect1-intlchar.isblank-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <code class="parameter">codepoint</code></dt> <dd> <p class="para">The <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> codepoint value (e.g. <em>0x2603</em> for <em class="emphasis">U+2603 SNOWMAN</em>), or the character encoded as a UTF-8 <span class="type"><a href="language.types.string.html" class="type string">string</a></span> (e.g. <em>"\u{2603}"</em>)</p> </dd> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-intlchar.isblank-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> if <code class="parameter">codepoint</code> is either a "blank" or "horizontal space" character, <strong><code>FALSE</code></strong> if not. </p> </div> <div class="refsect1 examples" id="refsect1-intlchar.isblank-examples"> <h3 class="title">Examples</h3> <div class="example" id="example-3221"> <p><strong>Example #1 Testing different code points</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">isblank</span><span style="color: #007700">(</span><span style="color: #DD0000">"A"</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">isblank</span><span style="color: #007700">(</span><span style="color: #DD0000">" "</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">isblank</span><span style="color: #007700">(</span><span style="color: #DD0000">"\t"</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> bool(false) bool(true) bool(true) </pre></div> </div> </div> </div> <div class="refsect1 seealso" id="refsect1-intlchar.isblank-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><span class="function"><a href="intlchar.isspace.html" class="function" rel="rdfs-seeAlso">IntlChar::isspace()</a> - Check if code point is a space character</span></li> <li class="member"><span class="function"><a href="intlchar.isjavaspacechar.html" class="function" rel="rdfs-seeAlso">IntlChar::isJavaSpaceChar()</a> - Check if code point is a space character according to Java</span></li> <li class="member"><span class="function"><a href="intlchar.isuwhitespace.html" class="function" rel="rdfs-seeAlso">IntlChar::isUWhiteSpace()</a> - Check if code point has the White_Space Unicode property</span></li> <li class="member"><span class="function"><a href="intlchar.iswhitespace.html" class="function" rel="rdfs-seeAlso">IntlChar::isWhitespace()</a> - Check if code point is a whitespace character according to ICU</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="intlchar.isbase.html">IntlChar::isbase</a></div> <div class="next" style="text-align: right; float: right;"><a href="intlchar.iscntrl.html">IntlChar::iscntrl</a></div> <div class="up"><a href="class.intlchar.html">IntlChar</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>