3v4l.org

run code in 300+ PHP versions simultaneously
<?php // //echo password_hash("key", PASSWORD_DEFAULT); // $hash = '$2y$10$kjbEIdPANKI/MwQrdIH8.OI1K.WKrjk4.mW7OzOuCUNcddTYWNgfu'; // if(password_verify("key", $hash)=== TRUE){ // ECHO "FOUND"; // }else { // echo "NOT FOUND";} $bobKeypair = sodium_crypto_box_keypair(); $bobPublicKey = sodium_crypto_box_publickey($bobKeypair); $key = base64_encode($bobPublicKey); echo $key; // Then share $bobPublicKey with Node A # Transmission: /* Sending from Node A to Node B */ $message = "Thư mật nè Hi there"; $ciphertext = sodium_crypto_box_seal($message, base64_decode($key)); //echo base64_decode($ciphertext); /* On Node B, receiving an encrypted message from Node A */ echo $decrypted = sodium_crypto_box_seal_open($ciphertext, $bobKeypair);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function sodium_crypto_box_keypair() in /in/OfqFq:15 Stack trace: #0 {main} thrown in /in/OfqFq on line 15
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
162.95 ms | 405 KiB | 5 Q