src/Friendlification.php
public static function getConstNameByValue($class, $value)
    {
        $constants = static::getReflection($class)->getConstants();
        $result = array_search($value, $constants);

        return $result;
    }
public static function getConstNameByValue($class, $value)
    {
        $constants = static::getReflection($class)->getConstants();
        $result = array_search($value, $constants);

        return $result;
    }
public static function getConstNameByValue ( $ class , $ value ) { $ constants = static :: getReflection ( $ class ) -> getConstants ( ) ; $ result = array_search ( $ value , $ constants ) ; return $ result ; }
Returns class const name by its value.

```php
use donbidon\Core\Friendlification;

class Foo
{
const ONE = 1;
const TWO = 2;
}

var_dump(Friendlification::getConstNameByValue('Foo', 1));
var_dump(Friendlification::getConstNameByValue('Foo', 2));
var_dump(Friendlification::getConstNameByValue('Foo', 3));
```
will output:
```
string(3) "ONE"
string(3) "TWO"
bool(false)
```

@param  string $class
@param  mixed $value
@return string|false
@throws \ReflectionException  Risen from static::getReflection().
Returns class const name by its value .