src/Util.php
public function publicKeyToAddress(string $publicKey)
    {
        if ($this->isHex($publicKey) === false) {
            throw new InvalidArgumentException('Invalid public key format.');
        }
        $publicKey = $this->stripZero($publicKey);

        if (strlen($publicKey) !== 130) {
            throw new InvalidArgumentException('Invalid public key length.');
        }
        return '0x' . substr($this->sha3(substr(hex2bin($publicKey), 1)), 24);
    }
public function publicKeyToAddress(string $publicKey)
    {
        if ($this->isHex($publicKey) === false) {
            throw new InvalidArgumentException('Invalid public key format.');
        }
        $publicKey = $this->stripZero($publicKey);

        if (strlen($publicKey) !== 130) {
            throw new InvalidArgumentException('Invalid public key length.');
        }
        return '0x' . substr($this->sha3(substr(hex2bin($publicKey), 1)), 24);
    }
public function publicKeyToAddress ( string $ publicKey ) { if ( $ this -> isHex ( $ publicKey ) === false ) { throw new InvalidArgumentException ( 'Invalid public key format.' ) ; } $ publicKey = $ this -> stripZero ( $ publicKey ) ; if ( strlen ( $ publicKey ) !== 130 ) { throw new InvalidArgumentException ( 'Invalid public key length.' ) ; } return '0x' . substr ( $ this -> sha3 ( substr ( hex2bin ( $ publicKey ) , 1 ) ) , 24 ) ; }
publicKeyToAddress

@param string $publicKey
@return string
publicKeyToAddress