3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encryptPassword($password) { $encryptedPassword = md5($password).md5("MOOYOUL"); // SHA1 암호화하고 Base64로 Encode한걸 또 다시 SHA1로 암호화 $encryptedPassword = sha1(sha1(sha1($encryptedPassword, true), true), false).sha1("MOOYOUL").sha1("merong"); return $encryptedPassword; } $original = "password"; $encrypted = encryptPassword($original); var_dump($original, $encrypted);
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
string(8) "password" string(120) "d2af52513f152ae233f80fbf688dbc1b0a7102495ff6404914e5442b50b9ab73d1933a0754f56827de3f89c69aa24cf5304b60f6bb2a8ffbc9fc3bde"
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9
Warning: Wrong parameter count for sha1() in /in/833ii on line 6 Warning: Wrong parameter count for sha1() in /in/833ii on line 6 Warning: Wrong parameter count for sha1() in /in/833ii on line 6 string(8) "password" string(80) "5ff6404914e5442b50b9ab73d1933a0754f56827de3f89c69aa24cf5304b60f6bb2a8ffbc9fc3bde"

preferences:
216.66 ms | 402 KiB | 314 Q