Collator::getAttribute

collator_get_attribute

Get collation attribute value

&reftitle.description;

&style.oop;

public ``int``false```Collator::getAttribute` `int` `attribute`

&style.procedural;

``int``false```collator_get_attribute` `Collator` `object` `int` `attribute`

Get a value of an integer collator attribute.

&reftitle.parameters;

`object`

- `Collator` object.

`attribute`

- Attribute to get value for.

&reftitle.returnvalues;

Attribute value,&return.falseforfailure;.

&reftitle.examples;

### `collator_get_attribute` example

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

&reftitle.seealso;

- `Collator` constants
- `collator_set_attribute`
- `collator_get_strength`