No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher une fonction PHP

MessageFormatter: : getErrorMessage

msgfmt_get_error_message

(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)

MessageFormatter::getErrorMessage -- msgfmt_get_error_messageGet the error text from the last operation

PHP: MessageFormatter::getErrorMessage - Manual Home of Manuel PHP  Contents Haut

Description

Object oriented style

public MessageFormatter::getErrorMessage ( void ) : string

Procedural style

msgfmt_get_error_message ( MessageFormatter $fmt ) : string

Get the error text from the last operation.

PHP: MessageFormatter::getErrorMessage - Manual Home of Manuel PHP  Contents Haut

Examples

Example #1 msgfmt_get_error_message() example

<?php
$fmt 
msgfmt_create("en_US""{0, number} monkeys on {1, number} trees");
$str msgfmt_format($fmt, array());
if(!
$str) {
    echo 
"ERROR: ".msgfmt_get_error_message($fmt) . " (" msgfmt_get_error_code($fmt) . ")\n";
}
?>

Example #2 OO example

<?php
$fmt 
= new MessageFormatter("en_US""{0, number} monkeys on {1, number} trees");
$str $fmt->format(array());
if(!
$str) {
    echo 
"ERROR: ".$fmt->getErrorMessage() . " (" $fmt->getErrorCode() . ")\n";
}
?>

The above example will output:

ERROR: msgfmt_format: not enough parameters: U_ILLEGAL_ARGUMENT_ERROR (1)

PHP: MessageFormatter::getErrorMessage - Manual Home of Manuel PHP  Contents Haut

See Also

Find a PHP function
Error Infobrol

Can not display this page of the Infobrol website

Type of error (18-01)

Unknown format specifier "&"

Please try again in a few minutes…

Return to the home page




Steph