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_uri; echo base64_encode(hash_hmac('sha1', 'apikey=5ce0020a-efa7-1180-2339-b6a6-9800fcff&appid=10647&secretkey=QFwpPRp%2Bg7Zdr9p5LwvPlG4WEh7XFJ1WupsO%2FUu9GPRXxXqnGoodfERyuOo4&timestamp=1408522094', 'QFwpPRp+g7Zdr9p5LwvPlG4WEh7XFJ1WupsO/Uu9GPRXxXqnGoodfERyuOo4'));
based on mcqja
Output for 5.1.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
apikey=5ce0020a-efa7-1180-2339-b6a6-9800fcff&appid=10647&secretkey=QFwpPRp%2Bg7Zdr9p5LwvPlG4WEh7XFJ1WupsO%2FUu9GPRXxXqnGoodfERyuOo4&timestamp=1408522094ZmJjNmM2MjUxMzNhNmY1MjRlNzI0ZjE0MzZlZTU0MGE4ZjE4M2M5MQ==
Output for 5.0.0 - 5.1.1
Warning: http_build_query() expects at most 2 parameters, 3 given in /in/QjPt0 on line 9 Fatal error: Call to undefined function hash_hmac() in /in/QjPt0 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/QjPt0 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/QjPt0 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/QjPt0 on line 9