3v4l.org

run code in 300+ PHP versions simultaneously
<?php $request = 'POST'; $url = '/'; $headers = array( 'X-Wix-Signature' => '3elavUOF0-I1_7tGz2XZKs_HSlrygsMiblpNFPKv3Ik', "X-Wix-Instance-Id" => "132fc751-9325-63d3-a605-f74e0c25192a", "X-Wix-Event-Id" => "da390885-e72f-4a93-be7f-a90220bac5c7", "X-Wix-Event-Type" => "/provision/provision", "X-Wix-Timestamp" => "2013-10-23T15:39:34.462Z", "X-Wix-Application-Id" => "132fbf95-d58e-f9ed-86e8-48b76f901d91" ); //$body = "{\n\t\"instance-id\": \"1328a7fe-e451-8780-d201-0c5d9a1fc02b\"\n}"; $body = '{"instance-id":"132fc751-9325-63d3-a605-f74e0c25192a"}'; <?php $request = 'POST'; $url = '/'; $headers = array( 'X-Wix-Signature' => '3elavUOF0-I1_7tGz2XZKs_HSlrygsMiblpNFPKv3Ik', "X-Wix-Instance-Id" => "132fc751-9325-63d3-a605-f74e0c25192a", "X-Wix-Event-Id" => "da390885-e72f-4a93-be7f-a90220bac5c7", "X-Wix-Event-Type" => "/provision/provision", "X-Wix-Timestamp" => "2013-10-23T15:39:34.462Z", "X-Wix-Application-Id" => "132fbf95-d58e-f9ed-86e8-48b76f901d91" ); //$body = "{\n\t\"instance-id\": \"1328a7fe-e451-8780-d201-0c5d9a1fc02b\"\n}"; $body = '{"instance-id":"132fc751-9325-63d3-a605-f74e0c25192a"}'; $appSecret = "97cfac6e-b061-4007-a03e-eb4bc199e620"; function concat($request, $url, $headers, $body) { // Request Method and Url separated by \n $result = trim($request); $result .= "\n"; $result .= trim($url); $result .= "\n"; // Sort Wix-* headers by key ksort($headers); // concatenate Wix-* headers (trimmed and separate by comma) $first = true; foreach ($headers as $header) { if ($header != 'X-Wix-Signature' && $first == true) { $result = $result . trim($header); $first = false; } else if ($header != 'X-Wix-Signature') { $result = $result . ',' . trim($header); } } // Add body $result = $result . "\n" . trim($body); return $result; } $concat = concat($request, $url, $headers, $body); // Encrypt with hmac and app secret $encrypted = hash_hmac('sha256', $concat, $appSecret); //$base64 = base64_encode($encrypted); echo "The computed signature is : " . $encrypted . "\n"; echo "The signature sent by Wix : " . $headers['X-Wix-Signature']; // { // "Host": "signature.wix.codeoasis.com", // "X-Wix-Signature": "3elavUOF0-I1_7tGz2XZKs_HSlrygsMiblpNFPKv3Ik", // "X-Wix-Instance-Id": "132fc751-9325-63d3-a605-f74e0c25192a", // "X-Wix-Event-Id": "da390885-e72f-4a93-be7f-a90220bac5c7", // "Content-Type": "application/json; charset=utf-8", // "X-Wix-Event-Type": "/provision/provision", // "X-Wix-Timestamp": "2013-10-23T15:39:34.462Z", // "X-Wix-Application-Id": "132fbf95-d58e-f9ed-86e8-48b76f901d91", // "Connection": "keep-alive", // "Accept": "*/*", // "User-Agent": "Dispatch/0.10.1", // "Content-Length": "54", // "body": // { // "instance-id":"132fc751-9325-63d3-a605-f74e0c25192a" // } // }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.210.0080.03412.38
5.4.200.0140.03812.37
5.4.190.0100.04212.37
5.4.180.0130.03812.37
5.4.170.0130.03912.38
5.4.160.0110.05812.37
5.4.150.0100.04212.37
5.4.140.0170.05212.06
5.4.130.0120.04212.04
5.4.120.0090.04312.01
5.4.110.0100.04212.01
5.4.100.0070.04412.00
5.4.90.0150.05212.00
5.4.80.0100.04512.00
5.4.70.0110.04112.00
5.4.60.0090.04212.00
5.4.50.0230.05912.00
5.4.40.0150.03611.99
5.4.30.0120.04611.98
5.4.20.0120.04111.97
5.4.10.0150.05311.98
5.4.00.0150.05211.47
5.3.270.0150.05112.72
5.3.260.0130.05012.72
5.3.250.0140.04812.72
5.3.240.0140.04812.72
5.3.230.0130.04912.71
5.3.220.0150.04612.68
5.3.210.0130.05012.68
5.3.200.0240.06512.68
5.3.190.0140.04212.67
5.3.180.0110.04212.67
5.3.170.0180.04112.67
5.3.160.0270.06412.67
5.3.150.0120.04812.67
5.3.140.0100.04512.66
5.3.130.0210.05712.65
5.3.120.0100.05812.66
5.3.110.0120.05412.66
5.3.100.0190.07612.12
5.3.90.0150.04912.09
5.3.80.0100.04712.07
5.3.70.0220.06712.08
5.3.60.0100.04712.07
5.3.50.0120.04212.00
5.3.40.0130.04512.00
5.3.30.0120.04411.94
5.3.20.0180.05511.72
5.3.10.0120.04411.69
5.3.00.0120.04711.67

preferences:
135.96 ms | 1394 KiB | 7 Q