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', $param_uri, $secretkey));
based on PQ4tJ
Output for 7.1.0
Notice: Use of undefined constant QFwpPRp - assumed 'QFwpPRp' in /in/hR3s5 on line 5 Notice: Use of undefined constant g7Zdr9p5LwvPlG4WEh7XFJ1WupsO - assumed 'g7Zdr9p5LwvPlG4WEh7XFJ1WupsO' in /in/hR3s5 on line 5 Notice: Use of undefined constant Uu9GPRXxXqnGoodfERyuOo4 - assumed 'Uu9GPRXxXqnGoodfERyuOo4' in /in/hR3s5 on line 5 Warning: A non-numeric value encountered in /in/hR3s5 on line 5 Warning: A non-numeric value encountered in /in/hR3s5 on line 5 Warning: Division by zero in /in/hR3s5 on line 5 Warning: A non-numeric value encountered in /in/hR3s5 on line 5 apikey=5ce0020a-efa7-1180-2339-b6a6-9800fcff&appid=10647&secretkey=NAN&timestamp=1408522094 Notice: Undefined variable: secretkey in /in/hR3s5 on line 11 ODc1ZWZkYjBjMDRkYTIxMGViYjc3OWUyNzM4MWFhNDhhMTRmZTU5MA==
Output for 7.0.0 - 7.0.14
Notice: Use of undefined constant QFwpPRp - assumed 'QFwpPRp' in /in/hR3s5 on line 5 Notice: Use of undefined constant g7Zdr9p5LwvPlG4WEh7XFJ1WupsO - assumed 'g7Zdr9p5LwvPlG4WEh7XFJ1WupsO' in /in/hR3s5 on line 5 Notice: Use of undefined constant Uu9GPRXxXqnGoodfERyuOo4 - assumed 'Uu9GPRXxXqnGoodfERyuOo4' in /in/hR3s5 on line 5 Warning: Division by zero in /in/hR3s5 on line 5 apikey=5ce0020a-efa7-1180-2339-b6a6-9800fcff&appid=10647&secretkey=NAN&timestamp=1408522094 Notice: Undefined variable: secretkey in /in/hR3s5 on line 11 ODc1ZWZkYjBjMDRkYTIxMGViYjc3OWUyNzM4MWFhNDhhMTRmZTU5MA==
Output for hhvm-3.10.0 - 3.12.0
Notice: Use of undefined constant QFwpPRp - assumed 'QFwpPRp' in /in/hR3s5 on line 5 Notice: Use of undefined constant g7Zdr9p5LwvPlG4WEh7XFJ1WupsO - assumed 'g7Zdr9p5LwvPlG4WEh7XFJ1WupsO' in /in/hR3s5 on line 5 Notice: Use of undefined constant Uu9GPRXxXqnGoodfERyuOo4 - assumed 'Uu9GPRXxXqnGoodfERyuOo4' in /in/hR3s5 on line 5 Warning: Division by zero in /in/hR3s5 on line 5 apikey=5ce0020a-efa7-1180-2339-b6a6-9800fcff&appid=10647&secretkey=0&timestamp=1408522094 Notice: Undefined variable: secretkey in /in/hR3s5 on line 11 Warning: HMAC requested without a key
Output for 5.1.2 - 5.6.28
Notice: Use of undefined constant QFwpPRp - assumed 'QFwpPRp' in /in/hR3s5 on line 5 Notice: Use of undefined constant g7Zdr9p5LwvPlG4WEh7XFJ1WupsO - assumed 'g7Zdr9p5LwvPlG4WEh7XFJ1WupsO' in /in/hR3s5 on line 5 Notice: Use of undefined constant Uu9GPRXxXqnGoodfERyuOo4 - assumed 'Uu9GPRXxXqnGoodfERyuOo4' in /in/hR3s5 on line 5 Warning: Division by zero in /in/hR3s5 on line 5 apikey=5ce0020a-efa7-1180-2339-b6a6-9800fcff&appid=10647&secretkey=0&timestamp=1408522094 Notice: Undefined variable: secretkey in /in/hR3s5 on line 11 ZTI1OWEyYTI0NmYyZGZkZTMzZTBlNjc4YWZiNzUzNDg5ODc5OWFkYw==
Output for 5.0.0 - 5.1.1
Notice: Use of undefined constant QFwpPRp - assumed 'QFwpPRp' in /in/hR3s5 on line 5 Notice: Use of undefined constant g7Zdr9p5LwvPlG4WEh7XFJ1WupsO - assumed 'g7Zdr9p5LwvPlG4WEh7XFJ1WupsO' in /in/hR3s5 on line 5 Notice: Use of undefined constant Uu9GPRXxXqnGoodfERyuOo4 - assumed 'Uu9GPRXxXqnGoodfERyuOo4' in /in/hR3s5 on line 5 Warning: Division by zero in /in/hR3s5 on line 5 Warning: http_build_query() expects at most 2 parameters, 3 given in /in/hR3s5 on line 9 Fatal error: Call to undefined function hash_hmac() in /in/hR3s5 on line 11
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Use of undefined constant QFwpPRp - assumed 'QFwpPRp' in /in/hR3s5 on line 5 Notice: Use of undefined constant g7Zdr9p5LwvPlG4WEh7XFJ1WupsO - assumed 'g7Zdr9p5LwvPlG4WEh7XFJ1WupsO' in /in/hR3s5 on line 5 Notice: Use of undefined constant Uu9GPRXxXqnGoodfERyuOo4 - assumed 'Uu9GPRXxXqnGoodfERyuOo4' in /in/hR3s5 on line 5 Warning: Division by zero in /in/hR3s5 on line 5 Fatal error: Call to undefined function: http_build_query() in /in/hR3s5 on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Use of undefined constant QFwpPRp - assumed 'QFwpPRp' in /in/hR3s5 on line 5 Notice: Use of undefined constant g7Zdr9p5LwvPlG4WEh7XFJ1WupsO - assumed 'g7Zdr9p5LwvPlG4WEh7XFJ1WupsO' in /in/hR3s5 on line 5 Notice: Use of undefined constant Uu9GPRXxXqnGoodfERyuOo4 - assumed 'Uu9GPRXxXqnGoodfERyuOo4' in /in/hR3s5 on line 5 Warning: Division by zero in /in/hR3s5 on line 5 Fatal error: Call to undefined function: http_build_query() in /in/hR3s5 on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant QFwpPRp - assumed 'QFwpPRp' in /in/hR3s5 on line 5 Notice: Use of undefined constant g7Zdr9p5LwvPlG4WEh7XFJ1WupsO - assumed 'g7Zdr9p5LwvPlG4WEh7XFJ1WupsO' in /in/hR3s5 on line 5 Notice: Use of undefined constant Uu9GPRXxXqnGoodfERyuOo4 - assumed 'Uu9GPRXxXqnGoodfERyuOo4' in /in/hR3s5 on line 5 Warning: Division by zero in /in/hR3s5 on line 5 Fatal error: Call to undefined function: http_build_query() in /in/hR3s5 on line 9