3v4l.org

run code in 200+ PHP versions simultaneously
<?php $password = 'foobar'; $salt = 'qwertzuiopasdfghjklyxc'; $hash = password_hash($password, PASSWORD_BCRYPT, [ 'salt' => $salt, ]); $froxlor_pwd_salt = str_replace(substr(strrchr($hash, "$"), 1), "", $hash); $froxlor_pwd_check = crypt($password, $froxlor_pwd_salt); $my_pwd_check = crypt($password, $froxlor_pwd_salt . $salt); printf("Password hashed (db): %s\n used salt: %s\n ---\n Froxlor password salt: %s\n Froxlor password check: %s\n ---\n My password check: %s", $hash, $salt, $froxlor_pwd_salt, $froxlor_pwd_check, $my_pwd_check);

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch php-master
Warning: password_hash(): The 'salt' option is no longer supported. The provided salt has been been ignored in /in/HKuRj on line 7 Password hashed (db): $2y$10$V2Nehe1GTBH4ZdFjbBetmOO7DHNxyIhZXtQKNd/I7DfFDMbIpk4dK used salt: qwertzuiopasdfghjklyxc --- Froxlor password salt: $2y$10$ Froxlor password check: *0 --- My password check: $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq
Output for branch php-master+opcache
Warning: password_hash(): The 'salt' option is no longer supported. The provided salt has been been ignored in /in/HKuRj on line 7 Password hashed (db): $2y$10$2Roo2yiCGRv7ZuCDkSOvOudLGsl3Lsm7CHeThUM5LxRr0de8igBcS used salt: qwertzuiopasdfghjklyxc --- Froxlor password salt: $2y$10$ Froxlor password check: *0 --- My password check: $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq
Output for branch php-master+jit
Warning: password_hash(): The 'salt' option is no longer supported. The provided salt has been been ignored in /in/HKuRj on line 7 Password hashed (db): $2y$10$1bKlg8bRPfZtDz9BwL9Hd.4.4WUBBKPzDKdy20pjJrI5ze33HkhsO used salt: qwertzuiopasdfghjklyxc --- Froxlor password salt: $2y$10$ Froxlor password check: *0 --- My password check: $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq
Output for Typed properties v2
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/HKuRj on line 7 Password hashed (db): $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq used salt: qwertzuiopasdfghjklyxc --- Froxlor password salt: $2y$10$ Froxlor password check: *0 --- My password check: $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq
Output for Arrow functions
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/HKuRj on line 7 Password hashed (db): $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq used salt: qwertzuiopasdfghjklyxc --- Froxlor password salt: $2y$10$ Froxlor password check: *0 --- My password check: $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq
Output for Object typehint
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/HKuRj on line 7 Password hashed (db): $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq used salt: qwertzuiopasdfghjklyxc --- Froxlor password salt: $2y$10$ Froxlor password check: *0 --- My password check: $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq
Output for Array change keys
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/HKuRj on line 7 Password hashed (db): $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq used salt: qwertzuiopasdfghjklyxc --- Froxlor password salt: $2y$10$ Froxlor password check: *0 --- My password check: $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq
Output for Lexical anon
Password hashed (db): $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq used salt: qwertzuiopasdfghjklyxc --- Froxlor password salt: $2y$10$ Froxlor password check: *0 --- My password check: $2y$10$qwertzuiopasdfghjklyxOX1PtwWRlNoWcltOPJ87LqNf8IYaRwIq

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page