3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function nsaEncrypt($key, $plainText) { $result = 0; for ($character = 0; $character < strlen($plainText); $character++) { $result = bcadd($result, ord($plainText[$character])); $result = bcmul($result, $key); } return $result; } print(nsaEncrypt(256, 'slslslslslslslslslslslslslslslslsl')); ?>
based on Hqeol
Output for 7.3.0alpha1
Fatal error: Uncaught Error: Call to undefined function bcadd() in /in/HFUbM:8 Stack trace: #0 /in/HFUbM(15): nsaEncrypt(256, 'slslslslslslsls...') #1 {main} thrown in /in/HFUbM on line 8
Process exited with code 255.
Output for 5.6.0 - 7.2.6
875898076256745900473460905208229749804987217216946953138758725611736382379545291776