3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $salt = '$1$rasmusle$'; $pass = 'foobar'; $algo = 'md5'; $poor = hash($algo, $salt . $pass); $better = crypt($pass, $salt); echo "$poor\n"; echo "$better\n";
Output for 5.1.2 - 5.3.6, 5.3.8 - 7.1.0
6a0570bacbe45cf8d8edf1eed5911d12 $1$rasmusle$242keU8rWQetP.VdhE8Tm.
Output for 5.3.7
6a0570bacbe45cf8d8edf1eed5911d12 $1$rasmusle
Output for 5.0.0 - 5.1.1
Fatal error: Call to undefined function hash() in /in/DSVPV on line 7
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: hash() in /in/DSVPV on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: hash() in /in/DSVPV on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: hash() in /in/DSVPV on line 7