3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Signature: AAAAAQHO6yf5j7OVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== $orig = 'AAAAAQHO6yf5j7OVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=='; $key = "EwBYAupvBAAUKods63Ys1fGlwiccIFJ+qE1hANsAAYmZfDsiP6o+esL/bT/wQnvyl9+6fOIQeVSMI9hLEbizNze/96KxEgaYXKxgbu5RvKdpcSuYgYRz4AKDgN2Oc0uuCOtOiaaIU85OT1VWVFTtRvBpKoxmWkJbc/fFvpOkkBnjfqbnFtpA45H2ZFEx8R3pc63idZsooF2sIx1s7/wIu6S0erA7O8Tg1+LJ7C1+PdQ3aG+ljqVm6v51NlqBaw+K8tS5LjabHvCxDUagGF2GGckOWQiLUJg/dBIBujVox6KLUaNR2CZfclEEntpcfo7HFC7UktyphdCLePY0Y2lPFQ3+j3T6KqyjEKqyw8fR30j9vYdYg2bhDuN53JvPq10DZgAACC4EtlY/2H4bKAEaZYZM3wCdejzR5z6RaepNNqZkYKCzmtfITQXUWnWkthzbTEDWrVs/FxUUcSXqBkaMm7K47MWl8YwO8d1+NBeTuC8ByouqxYHOy/Op2VdxD5Y4K3Ll+vHVvs4aLfYDpC3vWqM7YUDhrejQefWwbC+yjrLD9xUNYV2HVAZRFU3p4Syg4OlmB68d86iW3U/MUb+op6YHkag0f7KMQJW1RixBpK0ANBaniSz0X1sMnx9rjApKOtTai5qHaWiqXYJ22ozacHpfkyikgRvbpiMG0YHp0YUDZk5pCDQ+PqIpfGlgt8QkvRbWasON4c8u6a21v2K3ZpDyeIM2iWj/B483ZZI06/oByRUNZuMHz10iUdBGo64vAknqRlSq2SK0HuvLlxegYF8sMmuj2WsB"; $post_data = '{ "RelyingParty" : "http://auth.xboxlive.com", "TokenType" : "JWT", "Properties" : { "AuthMethod" : "RPS", "SiteName" : "user.auth.xboxlive.com", "RpsTicket" : "t=' . $key . '", } }'; $binary_signature = ''; print 'orig: ' . binhex(base64_decode($orig)) . PHP_EOL; print PHP_EOL; print 'orig: ' . $orig . PHP_EOL; print 'sha1: ' . base64_encode(hash_hmac('sha1', $post_data, $key, true)) . PHP_EOL; print 'sha256: ' . base64_encode(hash_hmac('sha256', $post_data, $key, true)) . PHP_EOL; print 'sha512: ' . base64_encode(hash_hmac('sha512', $post_data, $key, true)) . PHP_EOL; print PHP_EOL;
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function binhex() in /in/feWbm:20 Stack trace: #0 {main} thrown in /in/feWbm on line 20
Process exited with code 255.
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0
Fatal error: Call to undefined function binhex() in /in/feWbm on line 20
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: binhex() in /in/feWbm on line 20
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: binhex() in /in/feWbm on line 20
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: binhex() in /in/feWbm on line 20