3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $params = array( 'appid' => 10647, 'apikey' => '5ce0020a-efa7-1180-2339-b6a6-9800fcff', 'secretkey' => 'QFwpPRp+g7Zdr9p5LwvPlG4WEh7XFJ1WupsO/Uu9GPRXxXqnGoodfERyuOo4', 'timestamp' => 1408522094, ); ksort($params);//对数组键值进行升序排序 $param_uri = http_build_query($params,'','&'); echo $param_url; echo base64_encode(hash_hmac('sha1', $param_uri, $secretkey));
based on vLonS
Output for 5.1.2 - 7.1.0
Notice: Undefined variable: param_url in /in/pT44F on line 10 Notice: Undefined variable: secretkey in /in/pT44F on line 11 YjI5NzVmMGMzMjQ0MTFhMzFkMTE2MjhiZGIxMmU4MTUwMzZkMzhkMg==
Output for 5.0.4 - 5.1.1
Warning: http_build_query() expects at most 2 parameters, 3 given in /in/pT44F on line 9 Notice: Undefined variable: param_url in /in/pT44F on line 10 Fatal error: Call to undefined function hash_hmac() in /in/pT44F on line 11
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Warning: http_build_query() expects at most 2 parameters, 3 given in /in/pT44F on line 9 Notice: Undefined variable: param_url in /in/pT44F on line 10 Fatal error: Call to undefined function hash_hmac() in /in/pT44F on line 11
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: http_build_query() in /in/pT44F on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: http_build_query() in /in/pT44F on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: http_build_query() in /in/pT44F on line 9