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); function meow($string) { $callback = function($char) { return str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT); } return array_map($callback, str_split($string)); } var_dump( $a, $b, meow($a), meow($b), password_hash($a, PASSWORD_BCRYPT, ['salt' => 'boeschrikboeschrikboe!', 'cost' => 12]), password_hash($b, PASSWORD_BCRYPT, ['salt' => 'boeschrikboeschrikboe!', 'cost' => 12]) );
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'return' (T_RETURN) in /in/60mJh on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_RETURN in /in/60mJh on line 16
Process exited with code 255.