3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rsa_decrypt($value, $private_key_e, $public_key_n) { $resp = gmp_powm($value, $private_key_e, $public_key_n); return $resp; } $txt = base64_decode("O6d9IbAVAAADGfCRXooAACNG006bSQEAL/q3GkE7AAA="); $e = "Rivest_Shamir_Adleman"; $n = "MTE6Mzc5MzgxMDk4NDM2MzQ5"; echo rsa_decrypt($txt, $e, $n); ?>
Output for 8.0.2 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.4, 8.3.6 - 8.3.7
Fatal error: Uncaught ValueError: gmp_powm(): Argument #1 ($num) is not an integer string in /in/K8ZoP:3 Stack trace: #0 /in/K8ZoP(3): gmp_powm(';\xA7}!\xB0\x15\x00\x00\x03\x19\xF0\x91^\x8A\x00...', 'Rivest_Shamir_A...', 'MTE6Mzc5MzgxMDk...') #1 /in/K8ZoP(9): rsa_decrypt(';\xA7}!\xB0\x15\x00\x00\x03\x19\xF0\x91^\x8A\x00...', 'Rivest_Shamir_A...', 'MTE6Mzc5MzgxMDk...') #2 {main} thrown in /in/K8ZoP on line 3
Process exited with code 255.
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 ValueError: gmp_powm(): Argument #1 ($num) is not an integer string in /in/K8ZoP:3 Stack trace: #0 /in/K8ZoP(3): gmp_powm(';\xA7}!\xB0\x15\x00\x00\x03\x19\xF0\x91^\x8A\x00...', 'Rivest_Shamir_A...', 'MTE6Mzc5MzgxMDk...') #1 /in/K8ZoP(9): rsa_decrypt(';\xA7}!\xB0\x15\x00\x00\x03\x19\xF0\x91^\x8A\x00...', 'Rivest_Shamir_A...', 'MTE6Mzc5MzgxMDk...') #2 {main} thrown in /in/K8ZoP on line 3
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33, 8.0.13
Fatal error: Uncaught Error: Call to undefined function gmp_powm() in /in/K8ZoP:3 Stack trace: #0 /in/K8ZoP(9): rsa_decrypt(';\xA7}!\xB0\x15\x00\x00\x03\x19\xF0\x91^\x8A\x00...', 'Rivest_Shamir_A...', 'MTE6Mzc5MzgxMDk...') #1 {main} thrown in /in/K8ZoP on line 3
Process exited with code 255.
Output for 8.0.0 - 8.0.1
Fatal error: Uncaught TypeError: gmp_powm(): Argument #1 ($num) is not an integer string in /in/K8ZoP:3 Stack trace: #0 /in/K8ZoP(3): gmp_powm(';\xA7}!\xB0\x15\x00\x00\x03\x19\xF0\x91^\x8A\x00...', 'Rivest_Shamir_A...', 'MTE6Mzc5MzgxMDk...') #1 /in/K8ZoP(9): rsa_decrypt(';\xA7}!\xB0\x15\x00\x00\x03\x19\xF0\x91^\x8A\x00...', 'Rivest_Shamir_A...', 'MTE6Mzc5MzgxMDk...') #2 {main} thrown in /in/K8ZoP on line 3
Process exited with code 255.
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
Warning: gmp_powm(): Unable to convert variable to GMP - string is not an integer in /in/K8ZoP on line 3

preferences:
213.3 ms | 403 KiB | 286 Q