3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo bin2hex( openssl_encrypt( /* Message: */ "The quick brown fox jumps over the lazy dog", /* Cipher algorithm and block mode: */ 'aes-128-ctr', /* Encryption key: (don't use weak keys like this ever, it's just an example!): */ "\x01\x02\x03\x04"."\x05\x06\x07\x08" . "\x09\x0a\x0b\x0c" . "\x0d\x0e\x0f\x10", /* Constant that means "don't encode": */ OPENSSL_RAW_DATA, /* Initialization Vector or Nonce -- don't ever actually use all NULL bytes: */ str_repeat("\0", 16) // This is a really bad way to generate a nonce or IV. // See how it's done here: http://stackoverflow.com/a/30189841/2224584 ) );
Output for 7.1.20 - 7.3.1
Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/ih8om:4 Stack trace: #0 {main} thrown in /in/ih8om on line 4
Process exited with code 255.
Output for 5.4.15 - 5.6.30, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.1.12
8f99e1315fcc7875325149dda085c504fc157e39c0b7f31c6c0b333136a7a8877c4971a5ce5688f94ae650
Output for 5.0.0 - 5.4.14
Fatal error: Call to undefined function openssl_encrypt() in /in/ih8om on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: openssl_encrypt() in /in/ih8om on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: openssl_encrypt() in /in/ih8om on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: openssl_encrypt() in /in/ih8om on line 4