3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bcrypt = '$2a$12$9SIfjYSVOTw8xFn98DadmOYKMSyReSktMvm/tfiLFDYb.oGvO8LEC'; $bcryptNeedsRehash = preg_replace('/\$\d{2}\$/', '\$' . 11 . '\$', $bcrypt); var_dump($bcrypt, $bcryptNeedsRehash); var_dump(password_hash('qG$4%7fM', PASSWORD_BCRYPT, array('cost'=>13));
Output for 5.3.0 - 5.3.26, 5.4.0 - 5.4.16
Parse error: syntax error, unexpected ';' in /in/L2TRt on line 6
Process exited with code 255.

preferences:
173.39 ms | 1395 KiB | 51 Q