3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function pswd($password) { $conf = new DataStorage(); /*if($conf->value('app.password.salt') !== false) $salt = '$2y$'.$conf->value('app.password.salt').'$'; else*/ $salt = '$2y$'.substr(md5('zaqDFGDws123xc456derfPOADv78bg9tyGISh0nmjukiolp'), 0, 22).'$'; if(!function_exists('password_hash')) return crypt($password, $salt); else return password_hash($password, PASSWORD_DEFAULT, ['salt' => $salt, 'cost' => 12]); } echo pswd('1q2w3e4r5t');
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Error: Class 'DataStorage' not found in /in/DgO0U:4 Stack trace: #0 /in/DgO0U(16): pswd('1q2w3e4r5t') #1 {main} thrown in /in/DgO0U on line 4
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Fatal error: Class 'DataStorage' not found in /in/DgO0U on line 4
Process exited with code 255.