3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $key = "algjhsdiouahwergoiuawhgiouaehnrgzdfgb23523"; $hash_function = "sha256"; $i = 0; $found = []; while (count($found) < 2) { $pw = base64_encode(str_repeat($i, 5)); $hash = hash_hmac($hash_function, $pw, $key); if ($hash[0] === "\0") { $found[] = $pw; } $i++; } var_dump($i, $found);
based on BCPlG
Output for 5.4.1 - 7.2.0

Process exited with code 137.
Output for 5.3.11 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Ci1rh on line 6
Process exited with code 255.