3v4l.org

run code in 300+ PHP versions simultaneously
<?php function amx_authorization_header($id,$key,$url,$method='GET',$body=null) { $url=strtolower(urlencode($url)); $method=strtoupper($method); $content=empty($body)?'':base64_encode(md5($body,true)); $time=1508797800; $nonce=10; $data=implode('',[$id,$method,$url,$time,$nonce,$content]); $secret=base64_decode($key); $signature=base64_encode(hash_hmac('sha256',$data,$secret,true)); //print($data); return 'Authorization: amx'.implode(':',[$id,$signature,$nonce,$time]); } amx_authorization_header('cde','abc' ,'https://broker.negociecoins.com.br/tradeapi/v1/user/balance'); print(amx_authorization_header('cde','abc' ,'https://broker.negociecoins.com.br/tradeapi/v1/user/balance'));
Output for git.master, git.master_jit, rfc.property-hooks
Authorization: amxcde:UiRT3A2YPV3JiJp00MxJsFo6C9SSjVtANm86KGDVSJ8=:10:1508797800

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
29.48 ms | 405 KiB | 5 Q