3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secret_key = sodium_hex2bin( '70637679b45ba313a122e63f12b3a557a01be9c0519fc8d08bb98f3633134e66' . '812540a01852c7e582021d253c1ecee35e948e294befe19ccf1cdbafa6266260' ); $public_key = sodium_hex2bin( '812540a01852c7e582021d253c1ecee35e948e294befe19ccf1cdbafa6266260' ); $message = 'Soatok is a gay/demi dhole furry <3'; $signature = sodium_crypto_sign_detached($message, $secret_key); var_dump(sodium_bin2hex($signature)); var_dump(sodium_crypto_sign_verify_detached($signature, $message, $public_key));
based on isEVL
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 8.0.0alpha1 - beta1
Fatal error: Uncaught Error: Call to undefined function sodium_hex2bin() in /in/lKrJb:2 Stack trace: #0 {main} thrown in /in/lKrJb on line 2
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.21, 7.4.0 - 7.4.9
string(128) "ed5ffd42041982926937ea29076431372d05579215f00a77614b63eacf7ab517a7d8040dff9c7958775ede6511655f8a42358afd419b8289607d089df1a3cb02" bool(true)
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Call to undefined function sodium_hex2bin() in /in/lKrJb on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: sodium_hex2bin() in /in/lKrJb on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: sodium_hex2bin() in /in/lKrJb on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: sodium_hex2bin() in /in/lKrJb on line 2