3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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; } $arr = array( "showpassword"=>"yes", "bgcolor"=>"#ffffff"); $arrd = base64_encode(json_encode($arr)); echo json_decode(base64_decode($arrd)); ?>
based on lFSc3
Output for 7.1.0 - 7.2.6
Recoverable fatal error: Object of class stdClass could not be converted to string in /in/1G6jV on line 20
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.20
Catchable fatal error: Object of class stdClass could not be converted to string in /in/1G6jV on line 20
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /in/1G6jV:20 Stack trace: #0 {main}
Process exited with code 255.