Collator::getAttribute

collator_get_attribute

Get collation attribute value

Description

Object-oriented style

public intfalse Collator::getAttribute(int $attribute)

Procedural style

intfalse collator_get_attribute(Collator $object, int $attribute)

Get a value of an integer collator attribute.

Parameters

object

Collator object.

attribute

Attribute to get value for.

Return Values

Attribute value, or false on failure.

Examples

Example #1 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