3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mac($msg) { $key = "7h3_1337_k3y"; $nonce = "5uc3m01"; $bloc_size = 64; if(strlen($msg)==$bloc_size) { print("cas2"); $mac = $msg; } else if(strlen($msg)>$bloc_size) { print("cas3"); $mac = hash_hmac("sha512",$msg.$nonce,$key,true); } return crypt($mac,'$6$rounds=5000$OhMyG05h!'); } $lemessage="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; $mac = mac($lemessage); $valuemac=hash_hmac("sha512","aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5uc3m01","7h3_1337_k3y",true); print("**".strlen($valuemac)."***".$valuemac."*******"); $mac2=eval('return hex2bin("c210825a47af7f8869fb6e11adc9dd3eceb85735c47807badaff958f0af386f5e3f7e24c15034ff6dc71d117697f5853da05bb76ec7086d07f25b53f707d9477");'); $packed=pack('c*',"c210825a47af7f8869fb6e11adc9dd3eceb85735c47807badaff958f0af386f5e3f7e24c15034ff6dc71d117697f5853da05bb76ec7086d07f25b53f707d9477"); print("EEEEEEE".$packed."AAAAEEE"); $b=mac($mac2); if($mac==$b) { print("OK"); } else{ print("KO"); } print($mac); print($b);
Output for git.master, git.master_jit, rfc.property-hooks
cas3**64***d��%��i �h�����Ln��j�c�q�>����"`��9�]Sae��*�}j0X�`�(9+���*******EEEEEEEAAAAEEEcas2KO$6$rounds=5000$OhMyG05h!$B/yV3lD0SpUqLT5MXMAfhTevl9BptROanCQCgsuA66p6wCx3svuyxY2g7C/9q/4DoqFj5PPMHiBIATb2/NyV90$6$rounds=5000$OhMyG05h!$EVaV8jNGJn8deADd3yFF1E6Tcm1h.WDrVgwAGWzd/HMjLYAmMLNx4aPdShsP0sIpDzfLc.SHHnSoW779gxLSt0

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:
62.52 ms | 402 KiB | 8 Q