Last active
May 27, 2018 02:18
-
-
Save ngdanghau/f023ab0361f8a85261e77b4f6d019747 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $salt = '39e1e949fc21def2f2671b9dbd9712de'; | |
| $str_overral = $salt; | |
| // bắt đầu xóa dấu cách trong string | |
| $str_overral = preg_replace('/\s+/', '', $str_overral); | |
| $str_res=''; | |
| for ($i=0; $i < strlen($str_overral); $i++) { | |
| $l = $str_overral[$i]; | |
| $d = ord($str_overral[$i]); //lấy mã ASCII của ký tự | |
| if ( floor($d/2) == $d/2 ) { | |
| $str_res .= $l; | |
| } else { | |
| $str_res = $l . $str_res; | |
| } | |
| } | |
| echo $str_res; | |
| //e179917e1c99e1e934f2df2f26bdbd2d | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment