3v4l.org

run code in 300+ PHP versions simultaneously
<?php $request = 'POST'; $headers = array( 'x-wix-event-type' => '/provision/provision', 'x-wix-timestamp' => '2013-09-30T10:46:38.993Z', 'x-wix-signature' => 'BX1AQrO4IxNuwMIOhYiuiH0nrk-F8pamGgk6Oe7S82I', 'x-wix-application-id' => '1306dc69-eb2f-493d-fc98-f4e693829367', 'x-wix-instance-id'=> '1328a7fe-e451-8780-d201-0c5d9a1fc02b', 'x-wix-event-id'=> '2cdae256-750f-4cc8-bbde-b35018bf8ceb' ); $body = '{"instance-id":"1328a7fe-e451-8780-d201-0c5d9a1fc02b"}'; $key = "8bbb74b1-8864-47b3-804f-04925bf3ffba"; function concat($request, $headers, $body) { $result = ''; $result .= $request; $result .= "\n"; $headers = ksort($headers); foreach ($headers as $header => $value) { if ($header != 'x-wix-signature') { $result = $result . $header . ': ' . $value; } } $result = $result . "\n" . $body; } $concat = concat($request, $headers, $body); $encrypted = hash_hmac('sha256', $concat, $key); $base64 = base64_encode($encrypted); echo "The computed signature is : " . $base64 . "<br/>"; echo "The signature sent by Wix : " . $headers['x-wix-signature'];
Output for git.master, git.master_jit
Warning: foreach() argument must be of type array|object, bool given in /in/bBTl8 on line 24 Deprecated: hash_hmac(): Passing null to parameter #2 ($data) of type string is deprecated in /in/bBTl8 on line 34 The computed signature is : MTM1MmQyNDRjNGViODNhY2M0NjQxMDI0ZWY3ODM5N2EwNDlkNjNiYTRlMDI4ZTRlZmUwZDUzNWE0NmU3MDBjOA==<br/>The signature sent by Wix : BX1AQrO4IxNuwMIOhYiuiH0nrk-F8pamGgk6Oe7S82I
Output for rfc.property-hooks
Warning: foreach() argument must be of type array|object, true given in /in/bBTl8 on line 24 Deprecated: hash_hmac(): Passing null to parameter #2 ($data) of type string is deprecated in /in/bBTl8 on line 34 The computed signature is : MTM1MmQyNDRjNGViODNhY2M0NjQxMDI0ZWY3ODM5N2EwNDlkNjNiYTRlMDI4ZTRlZmUwZDUzNWE0NmU3MDBjOA==<br/>The signature sent by Wix : BX1AQrO4IxNuwMIOhYiuiH0nrk-F8pamGgk6Oe7S82I

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