3v4l.org

run code in 300+ PHP versions simultaneously
<?php $password = "password"; $iterations = 1000; // Generate a random IV using mcrypt_create_iv(), // openssl_random_pseudo_bytes() or another suitable source of randomness $salt = mcrypt_create_iv(16, MCRYPT_DEV_URANDOM); $hash = hash_pbkdf2("sha256", $password, $salt, $iterations, 20); echo $hash; ?>
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined function mcrypt_create_iv() in /in/TV7eA:7 Stack trace: #0 {main} thrown in /in/TV7eA on line 7
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.5.35 - 5.5.38, 5.6.0 - 5.6.28
Fatal error: Call to undefined function mcrypt_create_iv() in /in/TV7eA on line 7
Process exited with code 255.
Output for 5.5.34
65a80659bf4ba7fa5bc0
Output for 5.5.33
8cc06c02f395586a1476
Output for 5.5.32
163c2e7f12500ce0a3d2
Output for 5.5.31
2fa8271251b970c2bf61
Output for 5.5.30
64f92c6b6bd70c8270c9
Output for 5.5.29
48119b6851f936738dec
Output for 5.5.28
93c201dee4a79b385d29
Output for 5.5.27
7d3de40187f441951a74
Output for 5.5.26
b98a71d8594ea612e932
Output for 5.5.25
b27346c17a0043bcd64b
Output for 5.5.24
341c354ec2fd524d5a61
Output for 5.5.23
6c47731a87d20017e398
Output for 5.5.22
fc5dca391353b58d2131
Output for 5.5.21
d958387d6d3450459482
Output for 5.5.20
42cde2fd3d6462dc4325
Output for 5.5.19
b3afe2c38a71a89a943b
Output for 5.5.18
700f7b21d670aa214d7d
Output for 5.5.16
d3f30bad6fd5502756d9
Output for 5.5.15
b375ad1d858e8df0107d
Output for 5.5.14
9c9c72c51ccd8bcfbe92
Output for 5.5.13
e68761414804f4260705
Output for 5.5.12
e48809f711cd952f88be
Output for 5.5.11
97e283f465fc86110ca4
Output for 5.5.10
da7eef6fabf16569adce
Output for 5.5.9
4558bfaba7cd9050cd3e
Output for 5.5.8
270930368e47b2f92813
Output for 5.5.7
4d69379c14e550c0a27f
Output for 5.5.6
41d8ad35cab7b450a69e
Output for 5.5.5
d3ef384b807cfc984f53
Output for 5.5.4
6126cd0c11488b001617
Output for 5.5.3
5d060b73ce3f30279f83
Output for 5.5.2
a63883ce27e4bf4df520
Output for 5.5.1
b459d3df428bb7e600fe
Output for 5.5.0
2c5e1e2640ee196c5920
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined function hash_pbkdf2() in /in/TV7eA on line 9
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: mcrypt_create_iv() in /in/TV7eA on line 7
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: mcrypt_create_iv() in /in/TV7eA on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: mcrypt_create_iv() in /in/TV7eA on line 7

preferences:
264.53 ms | 401 KiB | 401 Q