app/GedcomRecord.php
public function alternateName(): ?string
    {
        if ($this->canShowName() && $this->getPrimaryName() !== $this->getSecondaryName()) {
            $all_names = $this->getAllNames();

            return $all_names[$this->getSecondaryName()]['full'];
        }

        return null;
    }
public function alternateName(): ?string
    {
        if ($this->canShowName() && $this->getPrimaryName() !== $this->getSecondaryName()) {
            $all_names = $this->getAllNames();

            return $all_names[$this->getSecondaryName()]['full'];
        }

        return null;
    }
public function alternateName ( ) : ? string { if ( $ this -> canShowName ( ) && $ this -> getPrimaryName ( ) !== $ this -> getSecondaryName ( ) ) { $ all_names = $ this -> getAllNames ( ) ; return $ all_names [ $ this -> getSecondaryName ( ) ] [ 'full' ] ; } return null ; }
Get the full name in an alternative character set

@return string|null
Get the full name in an alternative character set