3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xor_encrypt($in) { $key = array( "showpassword"=>"no", "bgcolor"=>"#ffffff"); $text = $in; $outText = ''; // Iterate through each character for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; }; echo xor_encrypt("ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV4sFxFeaAw"); ?>
Output for git.master, git.master_jit
Fatal error: Uncaught TypeError: strlen(): Argument #1 ($str) must be of type string, array given in /in/UuoZc:9 Stack trace: #0 /in/UuoZc(15): xor_encrypt('ClVLIh4ASCsCBE8...') #1 {main} thrown in /in/UuoZc on line 9
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /in/UuoZc:9 Stack trace: #0 /in/UuoZc(15): xor_encrypt('ClVLIh4ASCsCBE8...') #1 {main} thrown in /in/UuoZc on line 9
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:
60.56 ms | 401 KiB | 8 Q