3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = "meow"; $b = $a . "\0woef"; $a = hash_hmac('sha512', $a, 'boegaboe', true); $b = hash_hmac('sha512', $b, 'boegaboe', true); var_dump( $a, $b, password_hash($a, PASSWORD_BCRYPT, ['salt' => 'boeschrikboeschrikboe!', 'cost' => 12]), password_hash($b, PASSWORD_BCRYPT, ['salt' => 'boeschrikboeschrikboe!', 'cost' => 12]) );
Output for 7.0.0 - 7.1.0
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/d6biJ on line 12 Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/d6biJ on line 13 string(64) "�0P`����Ė����J�_����Ȳ%5�XLxi�:H������r�!Wo��z�ֹQ�j� " string(64) "�խ���>�ߨr�?�}O%��I ��:����lgM�D��nT)��}��k�l�76�_���" string(60) "$2y$12$Ym9lc2NocmlrYm9lc2Nocey15FeBtlB0BgeQzrwxpFUiYZLux3UMG" string(60) "$2y$12$Ym9lc2NocmlrYm9lc2NoceNOIq7CwCkjA/DkXmhZX37e08fQOkrb2"
Output for 5.5.0 - 5.6.28
string(64) "�0P`����Ė����J�_����Ȳ%5�XLxi�:H������r�!Wo��z�ֹQ�j� " string(64) "�խ���>�ߨr�?�}O%��I ��:����lgM�D��nT)��}��k�l�76�_���" string(60) "$2y$12$Ym9lc2NocmlrYm9lc2Nocey15FeBtlB0BgeQzrwxpFUiYZLux3UMG" string(60) "$2y$12$Ym9lc2NocmlrYm9lc2NoceNOIq7CwCkjA/DkXmhZX37e08fQOkrb2"
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/d6biJ on line 12
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/d6biJ on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/d6biJ on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/d6biJ on line 12
Process exited with code 255.