3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $a=fzz_encode('http://blog.csdn.net/fzzwake/article/details/3785884?$#%%'); echo fzz_decode($a); function fzz_encode($str) { for($i=0;$i<strlen($str);$i++) { $restr .= str_pad(dechex(ord($str{$i})),2,0,STR_PAD_LEFT); } return $restr; } function fzz_decode($str) { $arr = str_split($str,2); foreach ((array)$arr as $val) { $restr .= chr(hexdec($val)); } return $restr; }

preferences:
49.9 ms | 402 KiB | 5 Q