3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $secret = '5d41402abc4b2a76b9719d911017c592'; $baseUrl = 'http://mg.s.stuffio.com/api/widget/init?'; $params = [ 'amount' => 2, 'currency' => 'EUR', 'country' => 'AT'', 'merchant_id' => 2, 'uid' => 'test', ]; ksort($params); $stringToSign = implode('|', $params) . $secret; $params['signature'] = strtolower(md5($stringToSign)); echo $baseUrl . http_build_query($params);
based on dNoEi
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.6
Parse error: syntax error, unexpected '',' (T_CONSTANT_ENCAPSED_STRING), expecting ']' in /in/uJfL5 on line 8
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /in/uJfL5:7 Stack trace: #0 {main}
Process exited with code 255.