PHP string strcasecmp() function4 Sept 2024 | 1 min read PHP string strcasecmp() is predefine function. It is used to compare two given string. It is binary safe and case-insensitive. It is similar to the strncasecmp() function. It returns:
Syntax:
Example 1Output: Your first string is:JavaTPOINT Your second string is:JAVAtpoint 0 Example 2Output: By using strcasecmp() function:0 using strcasecmp() function:0 Example 3Output: -75 -7 Example 4Output: $str is equal to $vstr2 in a case-insensitive string comparison Reference: http://php.net/manual/en/function.strcasecmp.phpNext TopicPHP String |
PHP String Function The is an in-built function of PHP, which is used to convert the first character of each word to uppercase in a string. The is supported by the PHP 4 and above versions. It takes a string as an input and...
2 min read
PHP string Function The string function is in-built function of PHP. It is used to set local information. It returns the new current locale and False if the locale functionality is not implemented. Note: It returns value depends on the system. Syntax: Setlocale(constant,location); Parameter Description Required/Optional constant Specify the local information to be...
1 min read
PHP String Function The function is the in-built function of PHP. It is used to get numeric information. This function returns an array which contains local numeric and monetary formatting information. This function is a non-parameterized function, so we do not need to pass anything...
5 min read
PHP implode() is a string function, which joins the array elements in a string. It is a binary-safe function. In implode() function, parameters can be passed in any order. The implode() function works same as the join() function and returns a string created from the elements...
2 min read
PHP String Function The function is in-built function of PHP. It is used to access the individual elements of the locale categories. This function allows us to select any element specifically. Unlike the localeconv() function which returns all the local formatting information, function returns...
3 min read
PHP Function The function in-built string function of PHP. It is used to compare string by using a natural algorithm. Syntax: int strnatcmp ( string $str1 , string $str2 ) Parameter Description Required/Optional string1 required string2 required This function : returns: <0 if str1 is less than str2; returns : >0 if str1 is greater...
1 min read
PHP String Function The is a built-in function of PHP, which helps to compare the two strings from a specified start position to specified end position. This function is a binary-safe function and optionally case-sensitive. PHP 5 and above versions support this function. Syntax The syntax of...
3 min read
PHP string function The is an in-built function of PHP, which is used to add a backslash before some meta characters in the string. It returns the string by adding the backslash before every meta characters. It avoids SQL injections attacks of our database. The...
2 min read
PHP function PHP is most important string function. It is used to return information about characters in a string. Syntax: count_chars(string,mode); Parameter Description Required/Optional string The string to be checked Required mode Specify the return modes Optional Note: Depending on mode '' function returns one of the following: 0 : It is an array with the byte-value as key...
2 min read
PHP string function PHP string is predefined function. It is used to calculate the MD5 hash of a string. It uses the RSA DATA security. It returns the hash as a 32 character hexadecimal number. Note: We should not use this function for secure passwords, due...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India