IntlChar::isprint() function in PHP

Server Side ProgrammingProgrammingPHP

<p>The IntlChar::isprint() function checks whether the given input character is a printable character or not.</p><h2>Syntax</h2><pre class="result notranslate">IntlChar::isprint( val )</pre><h2>Parameters</h2><ul class="list"><li><p><strong>val</strong> &minus; An integer values or character encoded as a UTF-8 string. Required!</p></li></ul><h2>Return</h2><p>The IntlChar::isprint() function returns TRUE if the val is a printable character</p><h2>Example</h2><p>The following is an example &minus;</p><pre class="prettyprint notranslate">&lt;?php &nbsp; &nbsp;var_dump(IntlChar::isprint(&quot;Kites&quot;)); &nbsp; &nbsp;echo &quot;&lt;br&gt;&quot;; &nbsp; &nbsp;var_dump(IntlChar::isprint(&quot;&amp;&amp;&quot;)); &nbsp; &nbsp;echo &quot;&lt;br&gt;&quot;; &nbsp; &nbsp;var_dump(IntlChar::isprint(&quot;K&quot;)); ?&gt;</pre><h2>Output</h2><p>The following is the output &minus;</p><pre class="result notranslate">bool(true) bool(true) bool(false)</pre><h2>Example</h2><p>Let us see another example &minus;</p><pre class="prettyprint notranslate">&lt;?php &nbsp; &nbsp;var_dump(IntlChar::isprint(&quot;1234&quot;)); &nbsp; &nbsp;echo &quot;&lt;br&gt;&quot;; &nbsp; &nbsp;var_dump(IntlChar::isprint(&quot;1&quot;)); &nbsp; &nbsp;echo &quot;&lt;br&gt;&quot;; &nbsp; &nbsp;var_dump(IntlChar::isprint(&quot;hvhj165e615&quot;)); ?&gt;</pre><h2>Output</h2><p>The following is the output &minus;</p><pre class="result notranslate">NULL bool(true) NULL</pre>
raja
Updated on 30-Dec-2019 07:37:57

Advertisements