3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = [ 'cost' => 12, '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.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
Fatal error: Uncaught Error: Call to undefined function mcrypt_create_iv() in /in/Ws7CP:4 Stack trace: #0 {main} thrown in /in/Ws7CP on line 4
Process exited with code 255.
Output for 7.0.5
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Ws7CP on line 6 array(2) { ["hash"]=> string(60) "$2y$12$TImP9KWubjaEV7g1PtZdYOtrnqv6celyjqeYS.P32QxGaekJzSZNy" ["verify"]=> bool(true) }
Output for 7.0.4
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Ws7CP on line 6 array(2) { ["hash"]=> string(60) "$2y$12$m21Ta/0pU40HGVYU0AUMbefkCUeshMiZ7RJAGhYTMwU5/mZ1k/x5K" ["verify"]=> bool(true) }
Output for 7.0.3
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Ws7CP on line 6 array(2) { ["hash"]=> string(60) "$2y$12$d.bPltrdLApgykhzWRjUluGJiNi.ZEANdoPDtP4A/s1psSWk4zSrS" ["verify"]=> bool(true) }
Output for 7.0.2
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Ws7CP on line 6 array(2) { ["hash"]=> string(60) "$2y$12$gkU9JHY6.c/5ofOvsiKO4uNNdRUMD3RXsA123lQ4.05/BoA8v5Ed." ["verify"]=> bool(true) }
Output for 7.0.1
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Ws7CP on line 6 array(2) { ["hash"]=> string(60) "$2y$12$cTTsLsCaDVW6YSjlCG2Dh.7/oky9zKKBGUr911.pJLxgQDvr4zXvm" ["verify"]=> bool(true) }
Output for 7.0.0
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/Ws7CP on line 6 array(2) { ["hash"]=> string(60) "$2y$12$si9SkJh02JwG7g49Z/3EBusK.C.rC.2uIVyrvt9c8RXg.LlvHMmXi" ["verify"]=> bool(true) }
Output for 5.5.35, 5.6.21
Fatal error: Call to undefined function mcrypt_create_iv() in /in/Ws7CP on line 4
Process exited with code 255.
Output for 5.6.20
array(2) { ["hash"]=> string(60) "$2y$12$7myiG5/npFr7M95BzfY1jOa1IC12AJWSxbAjrAZpPQsDWKmKCXurq" ["verify"]=> bool(true) }
Output for 5.6.19
array(2) { ["hash"]=> string(60) "$2y$12$E0jdmLKNrRcahTBzRhiKh.KT/gR2R59Yk07oD3vS/l1jHGzdrrvui" ["verify"]=> bool(true) }
Output for 5.6.18
array(2) { ["hash"]=> string(60) "$2y$12$2Slk8g2jsGEkNx7OMHeOIuEvT/JYQdXtx5oLg1F39h1DJgJLEGz9i" ["verify"]=> bool(true) }
Output for 5.6.17
array(2) { ["hash"]=> string(60) "$2y$12$/i7R7fU01ZiPvvM59QgzpeKeqI2WTGV/Vdd42fmqgV0t1ESr1ImJW" ["verify"]=> bool(true) }
Output for 5.6.16
array(2) { ["hash"]=> string(60) "$2y$12$mULD0/nqKGeICVzaywzQ0.EoUzQXDHt8vpnfpAZ0U4E3WhvEcHSXu" ["verify"]=> bool(true) }
Output for 5.6.15
array(2) { ["hash"]=> string(60) "$2y$12$7W7Y5zCua1xxHFNRDPLL8OmA6J4f2q1z61cad0/36iux31MzXazpu" ["verify"]=> bool(true) }
Output for 5.6.14
array(2) { ["hash"]=> string(60) "$2y$12$jqygh8DkWE4jSi7r7YRby.7w6Ca8/aCBm.Gm6yRmQFkoyJmviLPy2" ["verify"]=> bool(true) }
Output for 5.6.13
array(2) { ["hash"]=> string(60) "$2y$12$sT/r223X.u7Ty1UAUYd2JONWUzeXYZ8KmCOQOhUAJeAdfhpEHVzeO" ["verify"]=> bool(true) }
Output for 5.6.12
array(2) { ["hash"]=> string(60) "$2y$12$MZSDIWZTt7OghLXtKcVYku/RSlVEX/alQEwY5QjwL1z0Jbztpqway" ["verify"]=> bool(true) }
Output for 5.6.11
array(2) { ["hash"]=> string(60) "$2y$12$eMBshRgox5TMl2EfyFEYP.CtwW6NUM25ajepshEqFi7Q04UR/WD1G" ["verify"]=> bool(true) }
Output for 5.6.10
array(2) { ["hash"]=> string(60) "$2y$12$EX6ImmQBMwnVhi.y6mYqwuDImAt.oujdgMwZDDV1X4ynSSWOEmFOK" ["verify"]=> bool(true) }
Output for 5.6.9
array(2) { ["hash"]=> string(60) "$2y$12$2G4qAPZ5V/YyBqJ2qvONr.ZskcIR9TlgKzIu3B4EfLtnFy0CSLxs2" ["verify"]=> bool(true) }
Output for 5.6.8
array(2) { ["hash"]=> string(60) "$2y$12$ywVOsxkkW0F4tWxL77n.yeir47vXsKJGFJOp4/qXz59UHoqnXKz9O" ["verify"]=> bool(true) }
Output for 5.6.7
array(2) { ["hash"]=> string(60) "$2y$12$J2YEwF7AiuFS2z5/ybE5AO2mTGZ0fw9GxPEe/vhsxIcFoP4ghwXD2" ["verify"]=> bool(true) }
Output for 5.5.34
array(2) { ["hash"]=> string(60) "$2y$12$5zuIH6GfKYyzDNc819ypSejk7N3x2bZPQyIi0VWqVFajkRqWA/XOe" ["verify"]=> bool(true) }
Output for 5.5.33
array(2) { ["hash"]=> string(60) "$2y$12$4vdpCao9qwpMT2pdLAUdz.BdgkvTxR8U2h9mmxuTFuAQTUDI5kMoa" ["verify"]=> bool(true) }
Output for 5.5.32
array(2) { ["hash"]=> string(60) "$2y$12$A0sywC.SvrEq96YFmTlvvOGceddchC4bTlUYMmuIyB/5rXM7bMu9q" ["verify"]=> bool(true) }
Output for 5.5.31
array(2) { ["hash"]=> string(60) "$2y$12$8wC0mnzX7lexAQkwczObr.yhXSVggAqZkkxmHUBYsz3ColH8Sys6y" ["verify"]=> bool(true) }
Output for 5.5.30
array(2) { ["hash"]=> string(60) "$2y$12$bjQ4ZuyMo89a50Wyag333ONsD8v5C7rr2HmGMm52QLP8irtzYC9zS" ["verify"]=> bool(true) }
Output for 5.5.29
array(2) { ["hash"]=> string(60) "$2y$12$Z9g2WY.NQKBVPzRxUuITSOFl9bKi8nbQ6X1eyXbn9R6rAYsIr05Am" ["verify"]=> bool(true) }
Output for 5.5.28
array(2) { ["hash"]=> string(60) "$2y$12$CF3kFZ3atjs7EYc8TB8WWeXUAZQDaSK6pz112hV6r5dnance5uWCm" ["verify"]=> bool(true) }
Output for 5.5.27
array(2) { ["hash"]=> string(60) "$2y$12$3z1U6MVPOVwCA3l1bs88cOFz90Yz8XnA/hZlBdWEv.x4hGCLnClI6" ["verify"]=> bool(true) }
Output for 5.5.26
array(2) { ["hash"]=> string(60) "$2y$12$T1tAwDRJ618rlfwazjOs4.6nMzwjD9BwFAdgroRfm7FvE/VyVmnMi" ["verify"]=> bool(true) }
Output for 5.5.25
array(2) { ["hash"]=> string(60) "$2y$12$vyAc.iXnVCCGhRlN3Mnh1.XZn5TBaKjTjDi/zurUB976dVdrKrv/O" ["verify"]=> bool(true) }
Output for 5.5.24
array(2) { ["hash"]=> string(60) "$2y$12$pL0o47QKZxw2dRBF7tckY.8lORhm1DRjTJxJYNpez.54F/OhvFQu6" ["verify"]=> bool(true) }
Output for 5.4.2 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/Ws7CP on line 6
Process exited with code 255.

preferences:
136.72 ms | 401 KiB | 135 Q