3v4l.org

run code in 300+ PHP versions simultaneously
<?php $max_length_bcrypt = '5a0a90c7caaa07139c8d1bfd848bda29571157799e2abbafe74065e827c01dd29d30f0f1'; $max_length_bcrypt_plus_extra = '5a0a90c7caaa07139c8d1bfd848bda29571157799e2abbafe74065e827c01dd29d30f0f1ae3531ac1956aba81cb4f3d4947f9ca99794132989789acb13655645'; var_dump($max_length_bcrypt, $max_length_bcrypt_plus_extra); $hash_options = [ 'salt' => '31c990a8b44218cc483712', // some awful salt 'cost' => 6, // Let's not abuse this wonderful web service (3v4l.org) ]; $hash_1 = password_hash($max_length_bcrypt, PASSWORD_BCRYPT, $hash_options); $hash_2 = password_hash($max_length_bcrypt_plus_extra, PASSWORD_BCRYPT, $hash_options); var_dump($hash_1, $hash_2); var_dump($hash_1 === $hash_2);
Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
string(72) "5a0a90c7caaa07139c8d1bfd848bda29571157799e2abbafe74065e827c01dd29d30f0f1" string(128) "5a0a90c7caaa07139c8d1bfd848bda29571157799e2abbafe74065e827c01dd29d30f0f1ae3531ac1956aba81cb4f3d4947f9ca99794132989789acb13655645" Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/4lGu3 on line 13 Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/4lGu3 on line 14 string(60) "$2y$06$31c990a8b44218cc48371u6jbl0HyWWOMTefYIravFrFSkfzswSxW" string(60) "$2y$06$31c990a8b44218cc48371u6jbl0HyWWOMTefYIravFrFSkfzswSxW" bool(true)
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.38
string(72) "5a0a90c7caaa07139c8d1bfd848bda29571157799e2abbafe74065e827c01dd29d30f0f1" string(128) "5a0a90c7caaa07139c8d1bfd848bda29571157799e2abbafe74065e827c01dd29d30f0f1ae3531ac1956aba81cb4f3d4947f9ca99794132989789acb13655645" string(60) "$2y$06$31c990a8b44218cc48371u6jbl0HyWWOMTefYIravFrFSkfzswSxW" string(60) "$2y$06$31c990a8b44218cc48371u6jbl0HyWWOMTefYIravFrFSkfzswSxW" bool(true)
Output for 5.4.0 - 5.4.45
string(72) "5a0a90c7caaa07139c8d1bfd848bda29571157799e2abbafe74065e827c01dd29d30f0f1" string(128) "5a0a90c7caaa07139c8d1bfd848bda29571157799e2abbafe74065e827c01dd29d30f0f1ae3531ac1956aba81cb4f3d4947f9ca99794132989789acb13655645" Fatal error: Call to undefined function password_hash() in /in/4lGu3 on line 13
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/4lGu3 on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/4lGu3 on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/4lGu3 on line 8
Process exited with code 255.

preferences:
227.01 ms | 401 KiB | 311 Q