3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = "foobar"; $salt = substr(hash('sha256', $content), 0, 22); echo password_hash($content, PASSWORD_BCRYPT, ['salt' => $salt]); //
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.13, 7.3.0 - 7.3.1
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/cjbRl on line 7 $2y$10$c3ab8ff13720e8ad9047dOG2OcChvg66HtMG99cap27wOLzQZVirO
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
$2y$10$c3ab8ff13720e8ad9047dOG2OcChvg66HtMG99cap27wOLzQZVirO

preferences:
75.12 ms | 402 KiB | 63 Q