3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array( "showpassword"=>"no", "bgcolor"=>"#ffffff"); $json = json_encode($data); $data2 = "ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV4sFxFeaAw="; $base64 = base64_decode($data2); echo $json . "\n" . $base64; $cookie = base64_decode('ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV4sFxFeaAw'); function xor_encrypt($in){ $text = $in; $key = json_encode(array( "showpassword"=>"no", "bgcolor"=>"#ffffff")); $outText = ''; for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } echo $outText; }
based on s9upj
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
{"showpassword":"no","bgcolor":"#ffffff"} UK"H+O%pSWh]UZ-T%UhR^,^h