3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secret_key = sodium_hex2bin( '70637679b45ba313a122e63f12b3a557a01be9c0519fc8d08bb98f3633134e66' . '812540a01852c7e582021d253c1ecee35e948e294befe19ccf1cdbafa6266260' ); $public_key = sodium_hex2bin( '812540a01852c7e582021d253c1ecee35e948e294befe19ccf1cdbafa6266260' ); $signature = sodium_crypto_sign_detached('Soatok is a gay/demi dhole furry <3', $secret_key); var_dump(sodium_bin2hex($signature)); var_dump(sodium_crypto_sign_verify_detached($signature, $message, $public_key));
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
string(128) "ed5ffd42041982926937ea29076431372d05579215f00a77614b63eacf7ab517a7d8040dff9c7958775ede6511655f8a42358afd419b8289607d089df1a3cb02" Warning: Undefined variable $message in /in/isEVL on line 12 Deprecated: sodium_crypto_sign_verify_detached(): Passing null to parameter #2 ($message) of type string is deprecated in /in/isEVL on line 12 bool(false)
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fatal error: Uncaught Error: Call to undefined function sodium_hex2bin() in /in/isEVL:2 Stack trace: #0 {main} thrown in /in/isEVL on line 2
Process exited with code 255.
Output for 8.0.1 - 8.0.30
string(128) "ed5ffd42041982926937ea29076431372d05579215f00a77614b63eacf7ab517a7d8040dff9c7958775ede6511655f8a42358afd419b8289607d089df1a3cb02" Warning: Undefined variable $message in /in/isEVL on line 12 bool(false)
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.4.33, 8.0.0
Fatal error: Uncaught Error: Call to undefined function sodium_hex2bin() in /in/isEVL:2 Stack trace: #0 {main} thrown in /in/isEVL on line 2
Process exited with code 255.
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.31, 7.3.33, 7.4.0 - 7.4.25, 7.4.27 - 7.4.32
string(128) "ed5ffd42041982926937ea29076431372d05579215f00a77614b63eacf7ab517a7d8040dff9c7958775ede6511655f8a42358afd419b8289607d089df1a3cb02" Notice: Undefined variable: message in /in/isEVL on line 12 bool(false)
Output for 7.3.32, 7.4.26
string(128) "ed5ffd42041982926937ea29076431372d05579215f00a77614b63eacf7ab517a7d8040dff9c7958775ede6511655f8a42358afd419b8289607d089df1a3cb02" bool(false)
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/isEVL 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/isEVL 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/isEVL 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/isEVL on line 2

preferences:
296.49 ms | 401 KiB | 460 Q