The IntlChar::isJavaIDStart() function is an inbuilt function in PHP which is used to check whether the input character code point is permissible since the first character is a java identifier or not. It is True for characters with general category “Sc” (Currency Symbols), and “Pc” (Connecting Punctuation).
Syntax:
bool IntlChar::isJavaIDStart( $codepoint )
Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter $codepoint is a character or integer value, which is encoded as a UTF-8 string.
Return Value: Returns True, if $codepoint start with Java identifier character, otherwise return False.
Below programs illustrate the IntlChar::isJavaIDStart() function in PHP:
Program 1:
PHP
<?php// PHP function to illustrate the// use of IntlChar::isJavaIDStart() // Input string codepoint value with// Capital and small lettervar_dump(IntlChar::isJavaIDStart("R"));// Input string codepoint value with small charactervar_dump(IntlChar::isJavaIDStart("r"));// Input control character codepoint value var_dump(IntlChar::isJavaIDStart("\n")); // Input string codepoint value var_dump(IntlChar::isJavaIDStart("Bug")); // Input int codepoint value var_dump(IntlChar::isJavaIDStart("3 ")); // Input int char an identifier// of codepoint valuevar_dump(IntlChar::isJavaIDStart("\u{007F}")); // Input symbolic codepoint value var_dump(IntlChar::isJavaIDStart(" @ "));var_dump(IntlChar::isJavaIDStart(" $ ")); ?> |
Output:
bool(true) bool(true) bool(false) NULL NULL bool(false) NULL NULL
Program 2:
PHP
<?php// PHP function to illustrate the// use of IntlChar::isJavaIDStart() // Declare an array with// different codepoint value $arr = array("C", " ", "\n", " #", "\t", "Code", ); // For loop condition to check // each character through functionforeach ($arr as $val) { // Check each element as code point data var_dump(IntlChar::isJavaIDStart($val));}?> |
Output:
bool(true) bool(false) bool(false) NULL bool(false) NULL
Related Articles:
- IntlChar::isIDIgnorable() Function
- IntlChar::isIDStart() Function
- IntlChar::isIDPart() Function
- IntlChar::isISOControl() Function
Reference: http://php.net/manual/en/intlchar.isjavaidstart.php
Recommended Posts:
- How to get the function name inside a function in PHP ?
- PHP | Get PHP configuration information using phpinfo()
- PHP | php.ini File Configuration
- How to import config.php file in a PHP script ?
- PHP | imagecreatetruecolor() Function
- PHP | ImagickDraw getTextAlignment() Function
- PHP | Ds\Sequence last() Function
- Function to escape regex patterns before applied in PHP
- PHP | array_udiff_uassoc() Function
- PHP | geoip_continent_code_by_name() Function
- PHP | GmagickPixel setcolor() function
- PHP | opendir() Function
- PHP | cal_to_jd() Function
- PHP | stream_get_transports() Function
- PHP | Ds\Deque pop() Function
- PHP | SimpleXMLElement children() Function
- PHP | is_numeric() Function
- PHP | Imagick adaptiveSharpenImage() Function
- PHP | XMLWriter endDtdEntity() Function
- PHP | isset() 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.
Improved By : arorakashish0911

