3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = [ 'cost' => 99, 'salt' => mcrypt_create_iv(256, MCRYPT_DEV_URANDOM), ]; $hash = password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options); $verify = password_verify("rasmuslerdorf",$hash); var_dump( [ "hash" => $hash, "verify" => $verify ]); ?>
Output for 7.0.6 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.13, 7.3.0 - 7.3.1
Fatal error: Uncaught Error: Call to undefined function mcrypt_create_iv() in /in/v57PN:4 Stack trace: #0 {main} thrown in /in/v57PN on line 4
Process exited with code 255.
Output for 5.5.24 - 5.5.34, 5.6.7 - 5.6.20, 7.0.0 - 7.0.5
Warning: password_hash(): Invalid bcrypt cost parameter specified: 99 in /in/v57PN on line 6 array(2) { ["hash"]=> NULL ["verify"]=> bool(false) }
Output for 5.5.35, 5.6.21
Fatal error: Call to undefined function mcrypt_create_iv() in /in/v57PN on line 4
Process exited with code 255.
Output for 5.4.2 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/v57PN on line 6
Process exited with code 255.

preferences:
95.35 ms | 401 KiB | 106 Q