3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xor_encrypt($in) { $key = '<censored>'; $text = $in; $outText = ''; // Iterate through each character for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; } function xor_decrypt($in) { $key = '<derosnec>'; $text = $in; $outText = ''; // Iterate through each character for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; } $my_data = array( "showpassword"=>"yes", "bgcolor"=>"#ffffff"); $my_data_e = base64_decode(xor_decrypt(json_decode($my_data, true))); $tempdata = json_decode(xor_encrypt(base64_decode($my_data_e)), true); echo $my_data_e;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in /in/1U48i:31 Stack trace: #0 /in/1U48i(31): json_decode(Array, true) #1 {main} thrown in /in/1U48i on line 31
Process exited with code 255.

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:
41.33 ms | 401 KiB | 8 Q