3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php postLikeStrToArray($str) { $_p = explode('&', $str); $post = []; foreach ($_p as $item) { $parts = explode('=', $item); $key = strtolower($parts[0]); $value = urldecode($parts[1]); $post[$key] = $value; } return $post; } $resp = "MerID=I0110DQX&amp;OrderID=191&amp;ResponseCode=3&amp;ReasonCode=11&amp;ReasonCodeDesc=Invalid+signature&amp;Signature=hHxm7Zd1GeUJz3ZfkloaNG%2BC1hk%3D"; $post = postLikeStrToArray($resp); print_r($post);
Output for 5.3.0 - 5.4.17
Parse error: syntax error, unexpected '{' in /in/S9qLf on line 3
Process exited with code 255.