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(255, 'ab')); ?>
based on pgJE8
Output for 7.3.0alpha1
Fatal error: Uncaught Error: Call to undefined function bcadd() in /in/Z8pPM:8 Stack trace: #0 /in/Z8pPM(15): nsaEncrypt(255, 'ab') #1 {main} thrown in /in/Z8pPM on line 8
Process exited with code 255.
Output for 5.6.0 - 7.2.6
6332415