3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump( password_hash('password', 2), password_hash('password', PASSWORD_ARGON2I), password_hash('password', PASSWORD_ARGON2) );
based on hM0n9
Output for 7.2.6

Process exited with code 139.
Output for 7.0.0 - 7.1.20
Warning: password_hash(): Unknown password hashing algorithm: 2 in /in/6nlom on line 4 Notice: Use of undefined constant PASSWORD_ARGON2I - assumed 'PASSWORD_ARGON2I' in /in/6nlom on line 5 Warning: password_hash() expects parameter 2 to be integer, string given in /in/6nlom on line 5 Notice: Use of undefined constant PASSWORD_ARGON2 - assumed 'PASSWORD_ARGON2' in /in/6nlom on line 6 Warning: password_hash() expects parameter 2 to be integer, string given in /in/6nlom on line 6 NULL NULL NULL
Output for hhvm-3.18.4 - 3.21.0
Warning: password_hash(): Unknown password hashing algorithm: 2 in /in/6nlom on line 7 Notice: Use of undefined constant PASSWORD_ARGON2I - assumed 'PASSWORD_ARGON2I' in /in/6nlom on line 5 Fatal error: Uncaught TypeError: Argument 2 passed to password_hash() must be an instance of int, string given in /in/6nlom:7 Stack trace: #0 /in/6nlom(7): password_hash() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Warning: password_hash(): Unknown password hashing algorithm: 2 in /in/6nlom on line 4 Notice: Use of undefined constant PASSWORD_ARGON2I - assumed 'PASSWORD_ARGON2I' in /in/6nlom on line 5 Warning: password_hash() expects parameter 2 to be long, string given in /in/6nlom on line 5 Notice: Use of undefined constant PASSWORD_ARGON2 - assumed 'PASSWORD_ARGON2' in /in/6nlom on line 6 Warning: password_hash() expects parameter 2 to be long, string given in /in/6nlom on line 6 NULL NULL NULL