3v4l.org

run code in 500+ PHP versions simultaneously
<?php $CLIENT_ID = "5372_dc3n7NvbHBApDwhEUEY5vq9fcaMSsYKnmYNMukC2"; $SECRET = "GFZtdbDOzxbA.ouvKX2ZGYoBL1Bi32cawWxalwL6kBDRZk8gPvZwNitAuROTJ9dl"; $nonce = rtrim(base64_encode(random_bytes(rand(12, 30))), '=');$nonce = rtrim(base64_encode(random_bytes(rand(12, 30))), '='); $created = gmdate('Y-m-d\TH:i:s\Z'); $message = $nonce . $created . $CLIENT_ID; $signature = base64_encode(hash_hmac('sha256', $message, $SECRET, true)); $auth_header = 'http://api.soaringspot.com/v1/hmac/v1 ' . 'ClientID="' . $CLIENT_ID . '", ' . 'Signature="' . $signature . '", ' . 'Nonce="' . $nonce . '", ' . 'Created="' . $created . '"'; echo "Nonce: " . $nonce . "\n"; echo "Created: " . $created . "\n"; echo "Auth: " . $auth_header . "\n\n"; $ch = curl_init("https://api.soaringspot.com/v1/contests"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: " . $auth_header, "Accept: application/hal+json", ]); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo "HTTP Code: " . $http_code . "\n"; echo "Response: " . $response . "\n"; ?>
Output for git.master_jit
Nonce: lQahtfa5HnqsLAQhgg Created: 2026-04-17T16:34:06Z Auth: http://api.soaringspot.com/v1/hmac/v1 ClientID="5372_dc3n7NvbHBApDwhEUEY5vq9fcaMSsYKnmYNMukC2", Signature="WDQ+hC+ggyp2xDOIr+63gWPaXmVs7u485VxMeebWLok=", Nonce="lQahtfa5HnqsLAQhgg", Created="2026-04-17T16:34:06Z" Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/kJcgt:20 Stack trace: #0 {main} thrown in /in/kJcgt on line 20
Process exited with code 255.
Output for git.master
Nonce: ksTsyD5wQdXlrSD6//Ra Created: 2026-04-17T16:34:06Z Auth: http://api.soaringspot.com/v1/hmac/v1 ClientID="5372_dc3n7NvbHBApDwhEUEY5vq9fcaMSsYKnmYNMukC2", Signature="Lh3iraFu8qSy1LGsSTbjCJXW5PmvKi/Lkqm+8eeC+8c=", Nonce="ksTsyD5wQdXlrSD6//Ra", Created="2026-04-17T16:34:06Z" Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/kJcgt:20 Stack trace: #0 {main} thrown in /in/kJcgt on line 20
Process exited with code 255.

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:
53.43 ms | 728 KiB | 4 Q