3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 ]); ?>
based on OEpFa
Output for 7.0.6 - 7.2.0
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.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/v57PN on line 2
Process exited with code 255.