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: ' . bin2hex(base64_decode($orig)) . PHP_EOL; print 'orig: ' . bin2hex(base64_decode($key)) . 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 5.1.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
orig: 0000000101ceeb27f98fb39500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 orig: 13005802ea6f0400142a876ceb762cd5f1a5c2271c20527ea84d6100db000189997c3b223faa3e7ac2ff6d3ff0427bf297dfba7ce21079548c23d84b11b8b33737bff7a2b11206985cac606eee51bca769712b98818473e0028380dd8e734bae08eb4e89a68853ce4e4f55565454ed46f0692a8c665a425b73f7c5be93a49019e37ea6e716da40e391f6645131f11de973ade2759b28a05dac231d6ceffc08bba4b47ab03b3bc4e0d7e2c9ec2d7e3dd437686fa58ea566eafe75365a816b0f8af2d4b92e369b1ef0b10d46a0185d8619c90e59088b50983f741201ba3568c7a28b51a351d8265f7251049eda5c7e8ec7142ed492dca985d08b78f63463694f150dfe8f74fa2aaca310aab2c3c7d1df48fdbd87588366e10ee379dc9bcfab5d03660000082e04b6563fd87e1b28011a65864cdf009d7a3cd1e73e9169ea4d36a66460a0b39ad7c84d05d45a75a4b61cdb4c40d6ad5b3f1715147125ea06468c9bb2b8ecc5a5f18c0ef1dd7e341793b82f01ca8baac581cecbf3a9d957710f96382b72e5faf1d5bece1a2df603a42def5aa33b6140e1ade8d079f5b06c2fb28eb2c3f7150d615d87540651154de9e12ca0e0e96607af1df3a896dd4fcc51bfa8a7a60791a8347fb28c4095b5462c41a4ad003416a7892cf45f5b0c9f1f6b8c0a4a3ad4da8b9a876968aa5d8276da8cda707a5f9328a4811bdba62306d181e9d18503664e6908343e3ea2297c6960b7c424bd16d66ac38de1cf2ee9adb5bf62b76690f27883368968ff078f37659234ebfa01c9150d66e307cf5d2251d046a3ae2f0249ea4654aad922b41eebcb9717a0605f2c326ba3d96b01 orig: AAAAAQHO6yf5j7OVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== sha1: p6Y+bRs//WSCqEP4vVq1ENqIMUw= sha256: Mn32eceBqT3V/mNZS+ZkrBwHHevm4bFSwxhHtPk5u1Y= sha512: 5Zz39ur8/Bv6He8YiB268CPNnhtFJQeU9tc+zMlGdvQ64vL2vnA/u5wp6xn0ISsvD5T0VOdDYTEz3HDP61Mcfw==
Output for 5.0.2 - 5.1.1
orig: 0000000101ceeb27f98fb39500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 orig: 13005802ea6f0400142a876ceb762cd5f1a5c2271c20527ea84d6100db000189997c3b223faa3e7ac2ff6d3ff0427bf297dfba7ce21079548c23d84b11b8b33737bff7a2b11206985cac606eee51bca769712b98818473e0028380dd8e734bae08eb4e89a68853ce4e4f55565454ed46f0692a8c665a425b73f7c5be93a49019e37ea6e716da40e391f6645131f11de973ade2759b28a05dac231d6ceffc08bba4b47ab03b3bc4e0d7e2c9ec2d7e3dd437686fa58ea566eafe75365a816b0f8af2d4b92e369b1ef0b10d46a0185d8619c90e59088b50983f741201ba3568c7a28b51a351d8265f7251049eda5c7e8ec7142ed492dca985d08b78f63463694f150dfe8f74fa2aaca310aab2c3c7d1df48fdbd87588366e10ee379dc9bcfab5d03660000082e04b6563fd87e1b28011a65864cdf009d7a3cd1e73e9169ea4d36a66460a0b39ad7c84d05d45a75a4b61cdb4c40d6ad5b3f1715147125ea06468c9bb2b8ecc5a5f18c0ef1dd7e341793b82f01ca8baac581cecbf3a9d957710f96382b72e5faf1d5bece1a2df603a42def5aa33b6140e1ade8d079f5b06c2fb28eb2c3f7150d615d87540651154de9e12ca0e0e96607af1df3a896dd4fcc51bfa8a7a60791a8347fb28c4095b5462c41a4ad003416a7892cf45f5b0c9f1f6b8c0a4a3ad4da8b9a876968aa5d8276da8cda707a5f9328a4811bdba62306d181e9d18503664e6908343e3ea2297c6960b7c424bd16d66ac38de1cf2ee9adb5bf62b76690f27883368968ff078f37659234ebfa01c9150d66e307cf5d2251d046a3ae2f0249ea4654aad922b41eebcb9717a0605f2c326ba3d96b01 orig: AAAAAQHO6yf5j7OVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== <br /> <b>Fatal error</b>: Call to undefined function hash_hmac() in <b>/in/JVs8s</b> on line <b>25</b><br />
Process exited with code 255.
Output for 5.0.0 - 5.0.1
orig: 0000000101ceeb27f98fb39500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000PHP_EOLorig: 13005802ea6f0400142a876ceb762cd5f1a5c2271c20527ea84d6100db000189997c3b223faa3e7ac2ff6d3ff0427bf297dfba7ce21079548c23d84b11b8b33737bff7a2b11206985cac606eee51bca769712b98818473e0028380dd8e734bae08eb4e89a68853ce4e4f55565454ed46f0692a8c665a425b73f7c5be93a49019e37ea6e716da40e391f6645131f11de973ade2759b28a05dac231d6ceffc08bba4b47ab03b3bc4e0d7e2c9ec2d7e3dd437686fa58ea566eafe75365a816b0f8af2d4b92e369b1ef0b10d46a0185d8619c90e59088b50983f741201ba3568c7a28b51a351d8265f7251049eda5c7e8ec7142ed492dca985d08b78f63463694f150dfe8f74fa2aaca310aab2c3c7d1df48fdbd87588366e10ee379dc9bcfab5d03660000082e04b6563fd87e1b28011a65864cdf009d7a3cd1e73e9169ea4d36a66460a0b39ad7c84d05d45a75a4b61cdb4c40d6ad5b3f1715147125ea06468c9bb2b8ecc5a5f18c0ef1dd7e341793b82f01ca8baac581cecbf3a9d957710f96382b72e5faf1d5bece1a2df603a42def5aa33b6140e1ade8d079f5b06c2fb28eb2c3f7150d615d87540651154de9e12ca0e0e96607af1df3a896dd4fcc51bfa8a7a60791a8347fb28c4095b5462c41a4ad003416a7892cf45f5b0c9f1f6b8c0a4a3ad4da8b9a876968aa5d8276da8cda707a5f9328a4811bdba62306d181e9d18503664e6908343e3ea2297c6960b7c424bd16d66ac38de1cf2ee9adb5bf62b76690f27883368968ff078f37659234ebfa01c9150d66e307cf5d2251d046a3ae2f0249ea4654aad922b41eebcb9717a0605f2c326ba3d96b01PHP_EOLPHP_EOLorig: AAAAAQHO6yf5j7OVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==PHP_EOL<br /> <b>Fatal error</b>: Call to undefined function hash_hmac() in <b>/in/JVs8s</b> on line <b>25</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
orig: 0000000101ceeb27f98fb39500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 orig: 13005802ea6f0400142a876ceb762cd5f1a5c2271c20527ea84d6100db000189997c3b223faa3e7ac2ff6d3ff0427bf297dfba7ce21079548c23d84b11b8b33737bff7a2b11206985cac606eee51bca769712b98818473e0028380dd8e734bae08eb4e89a68853ce4e4f55565454ed46f0692a8c665a425b73f7c5be93a49019e37ea6e716da40e391f6645131f11de973ade2759b28a05dac231d6ceffc08bba4b47ab03b3bc4e0d7e2c9ec2d7e3dd437686fa58ea566eafe75365a816b0f8af2d4b92e369b1ef0b10d46a0185d8619c90e59088b50983f741201ba3568c7a28b51a351d8265f7251049eda5c7e8ec7142ed492dca985d08b78f63463694f150dfe8f74fa2aaca310aab2c3c7d1df48fdbd87588366e10ee379dc9bcfab5d03660000082e04b6563fd87e1b28011a65864cdf009d7a3cd1e73e9169ea4d36a66460a0b39ad7c84d05d45a75a4b61cdb4c40d6ad5b3f1715147125ea06468c9bb2b8ecc5a5f18c0ef1dd7e341793b82f01ca8baac581cecbf3a9d957710f96382b72e5faf1d5bece1a2df603a42def5aa33b6140e1ade8d079f5b06c2fb28eb2c3f7150d615d87540651154de9e12ca0e0e96607af1df3a896dd4fcc51bfa8a7a60791a8347fb28c4095b5462c41a4ad003416a7892cf45f5b0c9f1f6b8c0a4a3ad4da8b9a876968aa5d8276da8cda707a5f9328a4811bdba62306d181e9d18503664e6908343e3ea2297c6960b7c424bd16d66ac38de1cf2ee9adb5bf62b76690f27883368968ff078f37659234ebfa01c9150d66e307cf5d2251d046a3ae2f0249ea4654aad922b41eebcb9717a0605f2c326ba3d96b01 orig: AAAAAQHO6yf5j7OVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== <br /> <b>Fatal error</b>: Call to undefined function: hash_hmac() in <b>/in/JVs8s</b> on line <b>25</b><br />
Process exited with code 255.
Output for 4.3.10 - 4.4.4
orig: 0000000101ceeb27f98fb39500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 orig: 13005802ea6f0400142a876ceb762cd5f1a5c2271c20527ea84d6100db000189997c3b223faa3e7ac2ff6d3ff0427bf297dfba7ce21079548c23d84b11b8b33737bff7a2b11206985cac606eee51bca769712b98818473e0028380dd8e734bae08eb4e89a68853ce4e4f55565454ed46f0692a8c665a425b73f7c5be93a49019e37ea6e716da40e391f6645131f11de973ade2759b28a05dac231d6ceffc08bba4b47ab03b3bc4e0d7e2c9ec2d7e3dd437686fa58ea566eafe75365a816b0f8af2d4b92e369b1ef0b10d46a0185d8619c90e59088b50983f741201ba3568c7a28b51a351d8265f7251049eda5c7e8ec7142ed492dca985d08b78f63463694f150dfe8f74fa2aaca310aab2c3c7d1df48fdbd87588366e10ee379dc9bcfab5d03660000082e04b6563fd87e1b28011a65864cdf009d7a3cd1e73e9169ea4d36a66460a0b39ad7c84d05d45a75a4b61cdb4c40d6ad5b3f1715147125ea06468c9bb2b8ecc5a5f18c0ef1dd7e341793b82f01ca8baac581cecbf3a9d957710f96382b72e5faf1d5bece1a2df603a42def5aa33b6140e1ade8d079f5b06c2fb28eb2c3f7150d615d87540651154de9e12ca0e0e96607af1df3a896dd4fcc51bfa8a7a60791a8347fb28c4095b5462c41a4ad003416a7892cf45f5b0c9f1f6b8c0a4a3ad4da8b9a876968aa5d8276da8cda707a5f9328a4811bdba62306d181e9d18503664e6908343e3ea2297c6960b7c424bd16d66ac38de1cf2ee9adb5bf62b76690f27883368968ff078f37659234ebfa01c9150d66e307cf5d2251d046a3ae2f0249ea4654aad922b41eebcb9717a0605f2c326ba3d96b01 orig: AAAAAQHO6yf5j7OVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== <br /> <b>Fatal error</b>: Call to undefined function: hash_hmac() in <b>/in/JVs8s</b> on line <b>25</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.9
orig: 0000000101ceeb27f98fb39500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000PHP_EOLorig: 13005802ea6f0400142a876ceb762cd5f1a5c2271c20527ea84d6100db000189997c3b223faa3e7ac2ff6d3ff0427bf297dfba7ce21079548c23d84b11b8b33737bff7a2b11206985cac606eee51bca769712b98818473e0028380dd8e734bae08eb4e89a68853ce4e4f55565454ed46f0692a8c665a425b73f7c5be93a49019e37ea6e716da40e391f6645131f11de973ade2759b28a05dac231d6ceffc08bba4b47ab03b3bc4e0d7e2c9ec2d7e3dd437686fa58ea566eafe75365a816b0f8af2d4b92e369b1ef0b10d46a0185d8619c90e59088b50983f741201ba3568c7a28b51a351d8265f7251049eda5c7e8ec7142ed492dca985d08b78f63463694f150dfe8f74fa2aaca310aab2c3c7d1df48fdbd87588366e10ee379dc9bcfab5d03660000082e04b6563fd87e1b28011a65864cdf009d7a3cd1e73e9169ea4d36a66460a0b39ad7c84d05d45a75a4b61cdb4c40d6ad5b3f1715147125ea06468c9bb2b8ecc5a5f18c0ef1dd7e341793b82f01ca8baac581cecbf3a9d957710f96382b72e5faf1d5bece1a2df603a42def5aa33b6140e1ade8d079f5b06c2fb28eb2c3f7150d615d87540651154de9e12ca0e0e96607af1df3a896dd4fcc51bfa8a7a60791a8347fb28c4095b5462c41a4ad003416a7892cf45f5b0c9f1f6b8c0a4a3ad4da8b9a876968aa5d8276da8cda707a5f9328a4811bdba62306d181e9d18503664e6908343e3ea2297c6960b7c424bd16d66ac38de1cf2ee9adb5bf62b76690f27883368968ff078f37659234ebfa01c9150d66e307cf5d2251d046a3ae2f0249ea4654aad922b41eebcb9717a0605f2c326ba3d96b01PHP_EOLPHP_EOLorig: AAAAAQHO6yf5j7OVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==PHP_EOL<br /> <b>Fatal error</b>: Call to undefined function: hash_hmac() in <b>/in/JVs8s</b> on line <b>25</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
orig: 0000000101ceeb27f98fb39500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000PHP_EOLorig: 13005802ea6f0400142a876ceb762cd5f1a5c2271c20527ea84d6100db000189997c3b223faa3e7ac2ff6d3ff0427bf297dfba7ce21079548c23d84b11b8b33737bff7a2b11206985cac606eee51bca769712b98818473e0028380dd8e734bae08eb4e89a68853ce4e4f55565454ed46f0692a8c665a425b73f7c5be93a49019e37ea6e716da40e391f6645131f11de973ade2759b28a05dac231d6ceffc08bba4b47ab03b3bc4e0d7e2c9ec2d7e3dd437686fa58ea566eafe75365a816b0f8af2d4b92e369b1ef0b10d46a0185d8619c90e59088b50983f741201ba3568c7a28b51a351d8265f7251049eda5c7e8ec7142ed492dca985d08b78f63463694f150dfe8f74fa2aaca310aab2c3c7d1df48fdbd87588366e10ee379dc9bcfab5d03660000082e04b6563fd87e1b28011a65864cdf009d7a3cd1e73e9169ea4d36a66460a0b39ad7c84d05d45a75a4b61cdb4c40d6ad5b3f1715147125ea06468c9bb2b8ecc5a5f18c0ef1dd7e341793b82f01ca8baac581cecbf3a9d957710f96382b72e5faf1d5bece1a2df603a42def5aa33b6140e1ade8d079f5b06c2fb28eb2c3f7150d615d87540651154de9e12ca0e0e96607af1df3a896dd4fcc51bfa8a7a60791a8347fb28c4095b5462c41a4ad003416a7892cf45f5b0c9f1f6b8c0a4a3ad4da8b9a876968aa5d8276da8cda707a5f9328a4811bdba62306d181e9d18503664e6908343e3ea2297c6960b7c424bd16d66ac38de1cf2ee9adb5bf62b76690f27883368968ff078f37659234ebfa01c9150d66e307cf5d2251d046a3ae2f0249ea4654aad922b41eebcb9717a0605f2c326ba3d96b01PHP_EOLPHP_EOLorig: AAAAAQHO6yf5j7OVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==PHP_EOL<br /> <b>Fatal error</b>: Call to undefined function: hash_hmac() in <b>/in/JVs8s</b> on line <b>25</b><br />