3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $key = hash_pbkdf2( 'sha256', 'foot assay palsy levin sn tenney slap rap sepoy sturm fine hue knox han pawn erro', "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\1e\x1f", 86000, 32, true ); $iv = random_bytes(openssl_cipher_iv_length('aes-256-ctr')); $data = 'Obscene artwork possibly from furaffinity.jpg'; $ciphertext = openssl_encrypt( $data, 'aes-256-ctr', $key, OPENSSL_RAW_DATA, $iv ); $decrypted = openssl_decrypt( $ciphertext, 'aes-256-ctr', $key, OPENSSL_RAW_DATA, $iv ); var_dump(bin2hex($ciphertext)); var_dump($decrypted);
based on TeHct
Output for 7.2.0
string(90) "51de7454e23f2ee78fa164ecacd60d185f2e3a6bb8c467e36f262affd7c79ddd0893da90b2cdf73b35215c7030" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.1.10
string(90) "0e4e6da957f53bc60c4f041fee1f6285d243e4577df402cb1b95b118efe9a41bccecb5b7c5f2c3290bc2204f5c" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.1.7
string(90) "905bfeb24a8df599d248b0b51355a4cbb9045fb4ef62951c5c9d952e080a2286ddc5db604f62b2e52cbe67a3e2" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.1.6
string(90) "d3e63dc45682b7d929d3e66abfb54014df8cc7d0b03cd8ad22fe4eb56ad96f1aab8be1ffd4959e4d0b84cb86a6" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.1.5
string(90) "4a9ef8c4b40c6325a363e26b8dbcab0d29fc97ec5e052c83e7e894af4ee0b818fe1df1c95b7323e50096d74a5b" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.1.0
string(90) "1c4fa7f0360a6defffed94e428a970530fb4acb2310f8184f6c8dc727e4608a18f7e60eb76bcec3ab90876b105" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.0.20
string(90) "8e16b26d9d45cca75b1d5d86c927a242c9c3fab22427eccd72d37bb04301f6001e975f3c644a1baf233aabfd6e" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.0.6
string(90) "f916added25e50d8078ebd8e37cf3d82b740609f15d150f54e3205d96e49e068b69513eabf3450308ad289f024" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.0.5
string(90) "41cc32c383e4b480a4710ffbd3225926892166fae1b1c25e3f6ecf3bb6e70a4c742b7dea386bdd550d9cf66ed9" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.0.4
string(90) "4e69ed82dc0d1f8594b6f71be33eec1281b1e9be94318107f3fdfc80c9b8a901eac5a5afef2b154a1f8399adcb" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.0.3
string(90) "1a62532f2db9617221e9166f0fd7f01a4ef7d8f89ad65f1cee0a3d7effc5b86dd0e19eff889e0cfa328d15b681" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.0.2
string(90) "63af077a97d62463904ebf280c415a1af395fc669bfad4d22f6d73b88e1e94ec7a88dd8cef855f194442c641b9" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.0.1
string(90) "bac6910863a0341dde6316b2227f84e7777434f08c21ce407cdf6161923015576c45b41f2a0b712c6b7e1742a6" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 7.0.0
string(90) "f575cabe8cd75b2d5e5bafc6cceabb7d96b41d8d64ddb23f682f6a253d6b11e41255183c51ba1fcf0678e8d79f" string(45) "Obscene artwork possibly from furaffinity.jpg"
Output for 5.5.24 - 5.6.28
Fatal error: Call to undefined function random_bytes() in /in/mdEkO on line 11
Process exited with code 255.
Output for 5.3.20 - 5.4.45
Fatal error: Call to undefined function hash_pbkdf2() in /in/mdEkO on line 2
Process exited with code 255.