3v4l.org

run code in 300+ PHP versions simultaneously
<?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-gcm')); $data = 'Obscene artwork possibly from furaffinity.jpg'; $ciphertext = openssl_encrypt( $data, 'aes-256-gcm', $key, OPENSSL_RAW_DATA, $iv ); $decrypted = openssl_decrypt( $ciphertext, 'aes-256-gcm', $key, OPENSSL_RAW_DATA, $iv ); var_dump(bin2hex($ciphertext)); var_dump($decrypted);
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
Fatal error: Uncaught Error: Call to undefined function openssl_cipher_iv_length() in /in/JW5lp:11 Stack trace: #0 {main} thrown in /in/JW5lp on line 11
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Call to undefined function random_bytes() in /in/JW5lp on line 11
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45
Fatal error: Call to undefined function hash_pbkdf2() in /in/JW5lp on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: hash_pbkdf2() in /in/JW5lp on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: hash_pbkdf2() in /in/JW5lp on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: hash_pbkdf2() in /in/JW5lp on line 2

preferences:
210.65 ms | 401 KiB | 324 Q