run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = 'huhu'; $secretKey = 'pNJtiYI3UaHUy9z2k8RVkwEXfIGpelgM'; $HexaIv = 'Nev6fiEwZpuSQ71Y'; $encryptionMethod = 'AES-256-CFB'; echo "Step 1:<br>"; $vStep1 = json_encode($data); echo $vStep1; echo "<br><br>"; echo "Step 2:<br>"; $vStep2 = openssl_encrypt($vStep1, $encryptionMethod, $secretKey, TRUE, $HexaIv); echo $vStep2; echo "<br><br>"; echo "Step 3:<br>"; $vStep3 = base64_encode($vStep2); echo $vStep3; echo "<br><br>"; echo "Step 4:<br>"; $vStep4 = base64_decode($vStep3); echo $vStep4; echo "<br><br>"; echo "Step 5:<br>"; $vStep5 = openssl_decrypt($vStep4, $encryptionMethod, $secretKey, TRUE, $HexaIv); echo $vStep5; echo "<br><br>"; echo "Step 6:<br>"; $vStep6 = json_decode($vStep5); echo $vStep6; echo "<br><br>";
based on sdV02
Output for 7.1.20, 7.2.6 - 7.3.0rc3
Step 1:<br>"huhu"<br><br>Step 2:<br> Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/dTSkW:15 Stack trace: #0 {main} thrown in /in/dTSkW on line 15
Process exited with code 255.
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.10, 7.2.0
Step 1:<br>"huhu"<br><br>Step 2:<br>�N��>�<br><br>Step 3:<br>uU6B5D7I<br><br>Step 4:<br>�N��>�<br><br>Step 5:<br>"huhu"<br><br>Step 6:<br>huhu<br><br>