3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $timeTarget = 0.2; $PASSWORD_BCRYPT ="ABCD" $cost = 9; do { $cost++; $start = microtime(true); password_hash("test", PASSWORD_BCRYPT, ["cost" => $cost]); $end = microtime(true); } while (($end - $start) < $timeTarget); echo "Appropriate Cost Found: " . $cost . "\n";
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '$cost' (T_VARIABLE) in /in/9PdM7 on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/9PdM7 on line 4
Process exited with code 255.