Here's a quick example on how to use sodium_crypto_box_seal(); where you have 2 people exchanging a $message - person 1 encrypts it so that only person 2 can decrypt it. It does not allow person 2 to know who sent it, as only their public key way used (see sodium_crypto_box to do that).
<?php
$keypair = sodium_crypto_box_keypair();
$keypair_public = sodium_crypto_box_publickey($keypair);
$keypair_secret = sodium_crypto_box_secretkey($keypair);
$message = 'hello';
$encrypted = sodium_crypto_box_seal($message, $keypair_public);
echo base64_encode($encrypted) . "\n";
$decrypted = sodium_crypto_box_seal_open($encrypted, $keypair);
echo $decrypted . "\n";
?>