PHP | IntlChar::isISOControl() Function
The IntlChar::isISOControl() function is an inbuilt function in PHP which is used to check whether the input code point is an ISO control code character or not. Specified code point to be determined whether the code point is ISO control code. It is True for general category “Cc” as U+0000…U+001f and U+007f…U+009f.
Syntax:
bool IntlChar::isISOControl( $codepoint )
Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter is a character or interger value, which is encoded as a UTF-8 string.
Return Value: If $codepoint is an ISO control code character then returns True, otherwise return False.
Note: If input code point parameter is String and Numbers then it returns NULL.
Below programs illustrate the IntlChar::isISOControl() Function in PHP:
Program 1:
<?php // PHP code to illustrate // IntlChar::isISOControl() function // Input control with double " " // character codepoint value var_dump(IntlChar::isISOControl("\n")); // Input control with single '' // character codepoint value var_dump(IntlChar::isISOControl('\n')); // Input string codepoint value var_dump(IntlChar::isISOControl("Sudo\tPlacement")); // Input int codepoint value var_dump(IntlChar::isISOControl("3 ")); // Input int codepoint value var_dump(IntlChar::isISOControl("1\n2\n3\n4\n ")); // Input floating codepoint value var_dump(IntlChar::isISOControl("33.44")); // Input int char an identifier // of codepoint value var_dump(IntlChar::isISOControl("\u{007F}")); // Input symbolic codepoint value var_dump(IntlChar::isISOControl(" @ ")); ?> |
Output:
bool(true) NULL NULL NULL NULL NULL bool(true) NULL
Program 2:
<?php // PHP code to illustrate // IntlChar::isIStart() function // Declare an array with // different codepoint value $arr = array("\r", ".", " ", "\n", "\u", " ", "\t", "\\", ); // For loop condition to check // each character through function foreach ($arr as $val) { // Check each element as code point data var_dump(IntlChar::isISOControl($val)); } ?> |
Output:
bool(true) bool(false) bool(false) bool(true) NULL bool(false) bool(true) bool(false)
Related Articles:
- IntlChar::isUWhiteSpace() Function
- IntlChar::isWhitespace() Function
- IntlChar::isUUppercase() Function
Reference: http://php.net/manual/en/intlchar.isisocontrol.php
Recommended Posts:
- How to call a function that return another function in JavaScript ?
- How to get the function name from within that function using JavaScript ?
- PHP | min( ) Function
- PHP Ds\Map sum() Function
- p5.js | sin() function
- p5.js | tan() function
- D3.js | d3.map.set() Function
- D3.js | d3.hcl() Function
- p5.js | log() function
- p5.js | red() function
- PHP | max( ) Function
- p5.js | cos() function
- PHP | pos() Function
- p5.js | max() function
- PHP | key() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



