src/Maths/Arithmetic/Helper.php
public static function isNarcissicNumber($a)
    {
        $sum = 0;
        for ($i=0;$i<strlen($a);$i++) {
            $sum += pow($a{$i}, strlen($a));
        }
        return ($sum==$a);
    }
public static function isNarcissicNumber($a)
    {
        $sum = 0;
        for ($i=0;$i<strlen($a);$i++) {
            $sum += pow($a{$i}, strlen($a));
        }
        return ($sum==$a);
    }
Test if a number is an "narcissic" number: an n-digit number that is equal to the sum of the n'th powers of its digits

@see https://en.wikipedia.org/wiki/Narcissistic_number
@param $a
@return bool