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' => 3, // 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 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 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
string(72) "5a0a90c7caaa07139c8d1bfd848bda29571157799e2abbafe74065e827c01dd29d30f0f1" string(128) "5a0a90c7caaa07139c8d1bfd848bda29571157799e2abbafe74065e827c01dd29d30f0f1ae3531ac1956aba81cb4f3d4947f9ca99794132989789acb13655645" Warning: password_hash(): Invalid bcrypt cost parameter specified: 3 in /in/3cr4V on line 13 Warning: password_hash(): Invalid bcrypt cost parameter specified: 3 in /in/3cr4V on line 14 NULL NULL 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/3cr4V 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/3cr4V 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/3cr4V on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/3cr4V on line 8
Process exited with code 255.

preferences:
267.92 ms | 401 KiB | 325 Q