3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $bcrypt = '$2a$12$9SIfjYSVOTw8xFn98DadmOYKMSyReSktMvm/tfiLFDYb.oGvO8LEC'; $bcryptNeedsRehash = preg_replace('/\$\d{2}\$/', '\$' . 11 . '\$', $bcrypt); var_dump($bcrypt, $bcryptNeedsRehash);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(60) "$2a$12$9SIfjYSVOTw8xFn98DadmOYKMSyReSktMvm/tfiLFDYb.oGvO8LEC" string(60) "$2a$11$9SIfjYSVOTw8xFn98DadmOYKMSyReSktMvm/tfiLFDYb.oGvO8LEC"