3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function c2asc($str){ for($i=0;$i<strlen($str);$i++){ $c=substr($str,$i,1); $a=ord($c); $s.='&#'.$a.';'; } return $s; } function xl_encode($content){ $content=c2asc(urlencode($content)); $content=str_replace("&#","",$content); $aryc = explode(';',$content); for($i=0;$i<count($aryc)-1;$i++){ $acont.=$aryc[$i]+67; } $content=$acont; $content=str_replace("14","A",$content); $content=str_replace("15","B",$content); $content=str_replace("16","C",$content); $content=str_replace("17","D",$content); $content=str_replace("18","E",$content); $content=str_replace("19","F",$content); $content=str_replace("20","G",$content); $content=str_replace("21","H",$content); $content=str_replace("22","I",$content); return $content; } //地址解密 function xldecode($content){ $content=str_replace("A","14",$content); $content=str_replace("B","15",$content); $content=str_replace("C","16",$content); $content=str_replace("D","17",$content); $content=str_replace("E","18",$content); $content=str_replace("F","19",$content); $content=str_replace("G","20",$content); $content=str_replace("H","21",$content); $content=str_replace("I","22",$content); $content=str_split($content,3); $arystr = implode(",",$content); $aryc = explode(',',$arystr); for($i=0;$i<count($aryc);$i++){ $acont.=chr($aryc[$i]-67); } $content=urldecode($acont); return $content; } $a = "XODMxNzI4MjQ4"; echo xl_encode($a);
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: s in /in/RCgua on line 6 Notice: Undefined variable: acont in /in/RCgua on line 16 B5A6135A4E7A5E9A01FA4D3A81F
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: s in /in/RCgua on line 6 Notice: Undefined variable: acont in /in/RCgua on line 16 B5A6135A4E7A5E9A01FA4D3A81F