3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $userPass = 'password'; $pass = md5($userPass); $options = ['cost' => 12]; if (password_needs_rehash($pass, PASSWORD_DEFAULT, $options)) { echo password_hash($userPass, PASSWORD_DEFAULT, $options); }
Output for 7.2.0
$2y$12$V6zdv0gM35tlHr2RKqtcauGyzdWHHuORmo7lJQd60dYSZL9Vcx1GC
Output for 7.1.10
$2y$12$xdJDrFnNpswiG3YzaXweSe2Jr68GAiEyj9RpYJmlN.7oOSA1cQD5i
Output for 7.1.7
$2y$12$lktzX7Al1e7bhWBL4al3o.9jRBjHtIfvOFQWpPaMdzvNHaMFTsMu2
Output for 7.1.6
$2y$12$uNTddvE11ktyaEWKZwbIqev5jp71TwuA8TtKtd1Bo.qaCAFjrwu3m
Output for 7.1.5
$2y$12$bQDNRmoTqPL812N9hlAzUOL6Q7BXMCS036PiNm/WBQbY61eGB2lIq
Output for 7.1.0
$2y$12$CH2GQ2EAfmz8E2L96tcr7ezP7tEhXZBRIQvlVBsDUKtdz4cW91.9i
Output for 7.0.20
$2y$12$ukljkQ3TprGVSBrJl6rmKuwJPvRBo2e3v5jEuCsdJ3traNVjht6lO
Output for 7.0.6
$2y$12$c015JDr1QB1Z5gKihyjqI.8nhgl8j6MfXwhbcGSjfnc44RRb5gKKO
Output for 7.0.5
$2y$12$zUNBm.axrdnYHBK6XhnK9uoGTAyZVBdZMX0A8inFpHPLtIzM5r.Fi
Output for 7.0.4
$2y$12$Ur9EWtrNRySa2n7bn2TePO2XGoCYBbyT/lqBrNgev6s5v9B4h96Gy
Output for 7.0.3
$2y$12$VtIWCe0aAhAkj31Rz26OnelO5oVwSWMi8BxU82MAQB47uTzRCTBfu
Output for 7.0.2
$2y$12$qvQGF96fpvoRiNKdUIlgAuNWHSRIzT5NYeIVbA9Sep6Lhc//EAxnS
Output for 7.0.1
$2y$12$BABLWnDj5D1FBD/TcIqlgO6PDXCGwMz0pn0TIpTwz68Jhr6I.iNPq
Output for 7.0.0
$2y$12$/MoyNvDLofhnxouoMD3cFuJNWrXCSLxgZhOMWrhOR9FvtNIIznG5q
Output for 5.6.28
$2y$12$ybweoscHALF/ftWrJPWGNOhomK/5D0y/0607KlRcirGqX9jpjqix6
Output for 5.6.21
$2y$12$Avw1iwyJknTA7f6Yxt4mEe57ZzPqgLxPUY4J6RVpWLEbWpBVKIsb.
Output for 5.6.20
$2y$12$xdbZhewOlqxu.2IGgX3VHuXimc1VbCwTG49zFeLsMxwpHTuz1l6Mm
Output for 5.6.19
$2y$12$QOuMJZFUd50qyXH9otDQFez2XFivX31mBiPeEz1mkB/sWCkcQQw7C
Output for 5.6.18
$2y$12$AS2k0FEII61leWS2KCl1NuXU/tobZflb0hdAa0svrHokVxySkNBKq
Output for 5.6.17
$2y$12$q91MEhOUHKhi4H/LEXngFeJbV9UAFrZv.qc6wLuq.pepU2vESL8Xq
Output for 5.6.16
$2y$12$1nV4eZzUSHgt4fFPfH0z.O15Xeav.HRzGm4VxUhKGvDNWCr6duee.
Output for 5.6.15
$2y$12$iK0WrAR84ZhYP.mtmNIA4.lkkmYTMEer8z/CGanSK10IGpoZ1jLJG
Output for 5.6.14
$2y$12$Bxv8ZIfs6wQkoNUsmM3ZHeqke7oGDlPsBhGg3URjSXTBHITNXaALi
Output for 5.6.13
$2y$12$5iLYLmYVuOOszpvBK0/UG.NS5IKM6.rpbVxWZyfkDFJ3Xk9rCIHHq
Output for 5.6.12
$2y$12$iBjE0HFfWEbhxsctfPB/1OaB2t10DzJzlCc/SMoulwOBJCDu4lw1G
Output for 5.6.11
$2y$12$u6Gl8ux1497fkH4l9vPtNeSpOZMGposY9hvjIVa6rBhmmcr90c7Fq
Output for 5.6.10
$2y$12$hGvRKZJ7/kO6Ydirsqx0.uXU3zhKt2wyfsGfrFTAlrEYDPKm16Z5q
Output for 5.6.9
$2y$12$dAyTebWjr3wfvEqM2izHUu/up53C0E4EJxbzD5G7XJb0W/PNCI9Hq
Output for 5.6.8
$2y$12$Adt4KzESZqLI2Gke8M/p..EmdQNrjGinJ32rrPw7VbCBUp62eisRq
Output for 5.5.35
$2y$12$EKM/IMPPRIi.NNczFmawmOGad334HEzxbkUePvGubzhJJ/PwLf556
Output for 5.5.34
$2y$12$5BUTvvEwf/QQHEelE8Ry4eWa5iWa9FO1WsS/mzsnNqT1QE1ZWS2BK
Output for 5.5.33
$2y$12$b0s3iJMIa0PpKg43hp18Zu3mgY1I.rme25aFr4RB7OFZuIf6R46mG
Output for 5.5.32
$2y$12$SydFEvvrY671vuLvqhR3GexOg9QA.qFEXYnuvDGFVqht5GtJeoeVu
Output for 5.5.31
$2y$12$s0Dowf8Ik8B4X5GoNu91muKG07uBfyOHEOAjNABpkSAtg74whVb1u
Output for 5.5.30
$2y$12$5dvgVEs0DacyYKn/ZCxHBO0WhRDpHa4pQDW75PokbPrgBbKwfCi/6
Output for 5.5.29
$2y$12$lNjnmvZ6eKAHZYU85.F82.1OfjDHQakkgkpj1aHsLPmPjjYJfYHA6
Output for 5.5.28
$2y$12$dmu0v6d6RLE9Ao9aTgqRPuV/S4klB6zi9Bp/n361KToVi7hCTaFam
Output for 5.5.27
$2y$12$rGCfkDxemwmtG7Jb07Ng8OKmmiMNAmFWDMI.r8syXsABSxEZpyA7W
Output for 5.5.26
$2y$12$jnSIxWpwnGUXBQ5Xo/DV4ej/kC0rT0rWkwjBWUPFY5RowZPUrLNtS
Output for 5.5.25
$2y$12$TjKGnvnjGq/xoIHONN0OL.mdSYLkT7KdRxUlaB9vAoAfji.IFFTOe
Output for 5.5.24
$2y$12$ZbK789tPFfbPYnhHHlD2L.daJoDo0JcId0fDn9mg3hFmzn3y3blre
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined function password_needs_rehash() in /in/3u5gU on line 8
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/3u5gU on line 6
Process exited with code 255.