3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? $key= json_encode(array("showpassword"=>"no", "bgcolor"=>"#ffffff")); $data=base64_decode('ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV4sFxFeaAw%3D'); function xor_encrypt($in) { $text = $in; $outText = ''; // Iterate through each character for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; } $key=xor_encrypt($data); echo $key; //echo xor_encrypt(array( "showpassword"=>"yes", "bgcolor"=>"#ffffff")); ?>
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: key in /in/bMA3X on line 11 Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/bMA3X:11 Stack trace: #0 /in/bMA3X(16): xor_encrypt('\nUK"\x1E\x00H+\x02\x04O%\x03\x13\x1A...') #1 {main} thrown in /in/bMA3X on line 11
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 Warning: Division by zero in /in/bMA3X on line 11 Notice: Undefined variable: key in /in/bMA3X on line 11 000000000000000000000000000000000000000007
Output for 4.3.0 - 5.3.29
<? $key= json_encode(array("showpassword"=>"no", "bgcolor"=>"#ffffff")); $data=base64_decode('ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV4sFxFeaAw%3D'); function xor_encrypt($in) { $text = $in; $outText = ''; // Iterate through each character for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; } $key=xor_encrypt($data); echo $key; //echo xor_encrypt(array( "showpassword"=>"yes", "bgcolor"=>"#ffffff")); ?>