3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $textToEncrypt = "5540"; $encryptionMethod = "aes-128-cbc"; $secretHash = "PYny9tcpR8KMilCybp4V"; $iv = "fgrgfvcfghtfdrfg"; $encryptedMessage = openssl_encrypt($textToEncrypt, $encryptionMethod, $secretHash, 0, $iv); $encryptedMessage = str_replace(' ', '+', $encryptedMessage); $encryptedMessage = str_replace(['/', '=', '+'], ['_', '', '*'], $encryptedMessage); echo 'Token for zone ' . $textToEncrypt . ' is ' . $encryptedMessage;
based on 0HFOF
Output for 7.1.20, 7.3.0beta1
Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/rp4LD:6 Stack trace: #0 {main} thrown in /in/rp4LD on line 6
Process exited with code 255.
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.1.16, 7.2.0 - 7.2.4
Token for zone 5540 is S*7q2z90015lCfrSjdfuDQ