3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* *功能:xor算法加密解密功能 */ /* *函数:MyEncrypt($string,$key) *参数:$string明文,$key密钥 *功能:明文加密 *返回:$string密文 */ function MyEncrypt($string,$key) { for($i=0;$i<strlen($string);$i++) { for($j=0;$j<strlen($key);$j++) { $string[$i] = $string[$i]^$key[$j]; } } return $string; } /* * 函数:MyDecrypt($string,$key) * 参数:$string密文,$key密钥 * 功能:密文解密 * 返回:$string明文 */ function MyDecrypt($string,$key) { for($i=0;$i<strlen($string);$i++) { for($j=0;$j<strlen($key);$j++) { $string[$i] = $key[$j]^$string[$i]; } } return $string; } /*Test $a = "123"; $b = "caleng,tcm=Tan Cheng Ming"; echo $a^$b; $Text = '13212313212'; $Key = '1234567890'; echo $Text.'<br><br>'; $Pass_Text = MyEncrypt($Text,$Key); echo $Pass_Text.'<br><br>'; $Dec_Text = MyDecrypt($Pass_Text,$Key); echo $Dec_Text; */ ?>
Output for git.master, git.master_jit, rfc.property-hooks

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
53.47 ms | 401 KiB | 8 Q