Collator::getAttribute

(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)
Get collation attribute value
public int Collator::getAttribute ( int $attr )

Object oriented style

Procedural style

int collator_get_attribute ( Collator $coll , int $attr )

Get a value of an integer collator attribute.

Parameters:
coll

Collator object.

attr

Attribute to get value for.

Returns:

Attribute value, or boolean FALSE on error.

Examples:
collator_get_attribute() example
<?php
$coll = collator_create( 'en_CA' );
$val = collator_get_attribute( $coll, Collator::NUMERIC_COLLATION );
if( $val === false )
{
    // Handle error.
}
?>

See also:

Collator -

collator_set_attribute() -

collator_get_strength() -

doc_php
2016-02-24 15:57:16
Comments
Leave a Comment

Please login to continue.