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
cdeGEThttps%3a%2f%2fbroker.negociecoins.com.br%2ftradeapi%2fv1%2fuser%2fbalance150879780010

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:
35.44 ms | 401 KiB | 8 Q