PHP | intl_is_failure() Function Last Updated : 18 May, 2019 Comments Improve Suggest changes Like Article Like Report The intl_is_failure() function is an inbuilt function in PHP which is used to check whether the given error code indicates failure. Syntax: bool intl_is_failure( $error_code ) Parameters: This function accepts single parameter $error_code which is a value that returned by the functions intl_get_error_code(), collator_get_error_code(). Return Value: If the code indicates some failure then it returns True and in case of success or a warning it returns False. Below programs illustrate the intl_is_failure() function in PHP: Program 1: php <?php // Function definition function check( $err_code ) { var_export( intl_is_failure( $err_code ) ); echo "\n"; } // Function call using error_code as parameter check( U_USING_FALLBACK_WARNING ); check( U_ILLEGAL_ARGUMENT_ERROR ); ?> Output: false true Program 2: php <?php // Function definition function check( $err_code ) { var_export( intl_is_failure( $err_code ) ); echo "\n"; } // Declare an array which contains error_code $arr = array( U_ZERO_ERROR, U_ILLEGAL_ARGUMENT_ERROR, U_USING_FALLBACK_WARNING, ); // Loop to call function foreach ($arr as $err) { // Check each element as // code point data check($err); } ?> Output: false true false Reference: https://www.php.net/manual/en/function.intl-is-failure.php Comment More infoAdvertise with us Next Article PHP | intl_is_failure() Function J jit_t Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Intl Similar Reads PHP | is_array() Function The is_array() is an inbuilt function in PHP. The is_array() function is used to check whether a variable is an array or not. Syntax: bool is_array($variable_name) Parameter: This function accept a single parameter as mentioned above and described below: $variable_name: This parameter holds the vari 2 min read PHP | is_countable() Function The is_countable() function is an inbuilt function in PHP which is used to check whether the content of the variable is countable or not. Syntax: bool is_countable ( mixed $var ) Parameters: This function accepts one parameter as mentioned above and described below: $var: This parameter holds the va 1 min read PHP IntlChar::isbase() Function PHP IntlChar::isbase() function is an inbuilt function in PHP that is used to check whether the given input data is a base character or not. If the specified code point is a base character then it returns TRUE for general categories "L" (Letters), "N" (numbers), "Mc" (spacing combining marks), and " 2 min read PHP | IntlChar::isalnum () Function The IntlChar::isalnum() function is an inbuilt function in PHP which is used to check the given input is an alphanumeric character (Digit or Letter) or not. It returns TRUE for characters with general categories "L" (letters) and "Nd" (decimal digit numbers). Syntax: bool IntlChar::isalnum( $codepoi 2 min read PHP | IntlChar::iscntrl() Function The IntlChar::iscntrl() function is an inbuilt function in PHP which is used to check the given input is a control character or not. Control characters are line feed, tab, escape, etc. A control character is one of the following types: ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f)I 2 min read Like