3v4l.org

run code in 300+ PHP versions simultaneously
<?php $salt = 'OaZZhZgCp/VAldZFX2o6leedzq6wLT.'; $options = array('cost' => 10,'salt' => $salt); echo password_hash('test123', PASSWORD_BCRYPT, $options)."\n"; echo crypt('test123', '$2a$10$' . $salt);
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/cFMG2 on line 4 $2y$10$OaZZhZgCp/VAldZFX2o6leedzq6wLT.S770.Hf1UkemwYsSRceUAi $2a$10$OaZZhZgCp/VAldZFX2o6leedzq6wLT.S770.Hf1UkemwYsSRceUAi
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
$2y$10$OaZZhZgCp/VAldZFX2o6leedzq6wLT.S770.Hf1UkemwYsSRceUAi $2a$10$OaZZhZgCp/VAldZFX2o6leedzq6wLT.S770.Hf1UkemwYsSRceUAi

preferences:
151.87 ms | 402 KiB | 196 Q