3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $password = "test"; echo $password + "\n"; $hashToStoreInDb = password_hash($password, PASSWORD_BCRYPT); echo $hashToStoreInDb + "\n"; $isPasswordCorrect = password_verify($password, $existingHashFromDb); echo $isPasswordCorrect + "\n"; ?>
Output for 7.1.0
Warning: A non-numeric value encountered in /in/qVfhu on line 4 Warning: A non-numeric value encountered in /in/qVfhu on line 4 0 Warning: A non-numeric value encountered in /in/qVfhu on line 6 Warning: A non-numeric value encountered in /in/qVfhu on line 6 0 Notice: Undefined variable: existingHashFromDb in /in/qVfhu on line 7 Warning: A non-numeric value encountered in /in/qVfhu on line 8 0
Output for 5.5.24 - 5.6.28, 7.0.0 - 7.0.14
00 Notice: Undefined variable: existingHashFromDb in /in/qVfhu on line 7 0
Output for hhvm-3.10.0 - 3.12.0
00 Notice: Undefined variable: existingHashFromDb in /in/qVfhu on line 7 Catchable fatal error: Argument 2 passed to password_verify() must be an instance of string, null given in /in/qVfhu on line 7
Process exited with code 255.
Output for 5.0.0 - 5.4.45
0 Fatal error: Call to undefined function password_hash() in /in/qVfhu on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
0 Fatal error: Call to undefined function: password_hash() in /in/qVfhu on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
0 Fatal error: Call to undefined function: password_hash() in /in/qVfhu on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
0 Fatal error: Call to undefined function: password_hash() in /in/qVfhu on line 5