3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secret = '5d41402abc4b2a76b9719d911017c592'; $baseUrl = 'http://mg.s.stuffio.com/api/widget/init?'; $params = [ 'amount' => 2, 'currency' => 'EUR', 'country' => 'AU'', 'merchant_id' => 2, 'uid' => 'test', ]; ksort($params); $stringToSign = implode('|', $params) . $secret; $params['signature'] = strtolower(md5($stringToSign)); echo $baseUrl . http_build_query($params);
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.6
Parse error: syntax error, unexpected '',' (T_CONSTANT_ENCAPSED_STRING), expecting ']' in /in/dNoEi on line 8
Process exited with code 255.

preferences:
159.86 ms | 1399 KiB | 35 Q