https://github.com/Bit-Wasp/bitcoin-php/blob/513a3b708db0eab989680549752f37ee8eb5e74e/src/Crypto/EcAdapter/Impl/Secp256k1/Key/PublicKey.php#L42 The negation is performed on the result of `get_resource_type($pubkey)`, not `get_resource_type($pubkey) == ...`