3v4l.org

run code in 300+ PHP versions simultaneously
<?php// User Public/Private Keys $private_key = 'private_key_user_id_QQKsTYtABdHd'; $public_key = 'public_key_user_id_v4dkuUg5pAeV'; // Data to be submitted $my_string = array( 'action' => 'api_register', 'first_name' => ".urlencode($first_name).", 'surname' => ".urlencode($surname).", 'user_password' => ".urlencode($user_password.)", 'user_password_repeat' => ".urlencode($user_password).", 'user_name' => ".urlencode($user_name).", 'signup_channel' => ".urlencode($signup_channel)." ); echo json_encode($my_string); // Generate content verification signature $signature = base64_encode(hash_hmac('sha1', $my_string, $private_key, TRUE)); $curl = curl_init(); if ( !$curl ) { print "Failed to initalise cURL object\n"; } else { $url ='https://www.casafina.com/api/user.php'; curl_setopt($ch, CURLOPT_CUSTOMREQUEST, array("signature" => $signature, "pubKey" => $public_key)); curl_setopt($ch, CURLOPT_POSTFIELDS, $my_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($my_string)) ); if ( !curl_setopt_array( $curl, $curl_opts ) ) { print "Unable to set properties on CURL object\n"; } else { $response = curl_exec( $curl ); $responseCode = curl_getinfo( $curl, CURLINFO_HTTP_CODE ); if ( is_bool( $response ) && $response == false ) { // Failed to make HTTP request to tracking URL echo 'Error from CURL in livefeed: "', curl_error( $curl ), '" ', var_export( curl_getinfo( $curl ), TRUE ); } else if ( ! ( $responseCode >= 200 && $responseCode <= 299 ) ) { // We got an HTTP response, but it was not successful print "Error: Tracking URL returned HTTP $responseCode\n"; } else { // All good print "Success, response was:\n"; echo var_export( $response ), "\n"; } } } curl_close( $curl ); // log the values $values[] = $response; $values[] = $responseCode; $values[] = $my_string; logResults($values, 'Casafina');

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)
8.3.70.0140.00716.58
8.3.60.0140.00718.43
8.3.50.0120.00521.14
8.3.40.0120.00318.66
8.3.30.0030.01520.22
8.3.20.0040.00420.16
8.3.10.0050.00322.10
8.3.00.0080.00022.52
8.2.180.0130.00916.63
8.2.170.0090.00522.96
8.2.160.0000.01422.25
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0040.00420.50
8.2.110.0050.00520.99
8.2.100.0140.00017.88
8.2.90.0030.00517.50
8.2.80.0080.00017.97
8.2.70.0040.00417.93
8.2.60.0000.01017.90
8.2.50.0000.00818.10
8.2.40.0040.00420.46
8.2.30.0070.00019.47
8.2.20.0070.00017.50
8.2.10.0080.00017.54
8.2.00.0000.00817.45
8.1.280.0090.00625.92
8.1.270.0080.00024.04
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.05
8.1.230.0070.00419.16
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0040.00417.10
8.1.190.0040.00417.11
8.1.180.0090.00018.10
8.1.170.0060.00318.72
8.1.160.0040.00418.73
8.1.150.0020.00518.49
8.1.140.0000.00817.34
8.1.130.0030.00317.68
8.1.120.0000.00717.21
8.1.110.0000.00817.20
8.1.100.0000.00717.21
8.1.90.0040.00417.32
8.1.80.0000.00717.20
8.1.70.0000.00817.32
8.1.60.0040.00417.36
8.1.50.0080.00017.38
8.1.40.0040.00417.26
8.1.30.0060.00317.40
8.1.20.0040.00417.44
8.1.10.0040.00417.27
8.1.00.0030.00917.25
8.0.300.0070.00019.64
8.0.290.0000.00816.63
8.0.280.0000.00718.40
8.0.270.0030.00317.25
8.0.260.0070.00016.74
8.0.250.0030.00316.65
8.0.240.0050.00316.80
8.0.230.0030.00316.79
8.0.220.0000.00716.66
8.0.210.0070.00016.73
8.0.200.0030.00316.83
8.0.190.0070.00016.68
8.0.180.0000.00816.77
8.0.170.0040.00416.78
8.0.160.0040.00416.71
8.0.150.0000.00716.65
8.0.140.0070.00016.60
8.0.130.0030.00313.31
8.0.120.0050.00216.67
8.0.110.0070.00016.66
8.0.100.0000.00716.74
8.0.90.0030.00316.71
8.0.80.0040.01116.63
8.0.70.0050.00216.71
8.0.60.0000.00716.62
8.0.50.0040.00416.70
8.0.30.0070.01416.81
8.0.20.0090.01017.40
8.0.10.0040.00416.65
8.0.00.0100.00916.52
7.4.330.0000.00515.00
7.4.320.0000.00616.48
7.4.300.0030.00316.33
7.4.290.0060.00016.31
7.4.280.0030.00316.40
7.4.270.0070.00016.45
7.4.260.0050.00013.25
7.4.250.0040.00416.32
7.4.240.0020.00516.43
7.4.230.0070.00016.34
7.4.220.0070.01116.51
7.4.210.0100.00616.44
7.4.200.0030.00316.48
7.4.190.0000.00716.50
7.4.160.0110.00416.35
7.4.150.0160.00317.40
7.4.140.0100.01017.86
7.4.130.0070.01016.22
7.4.120.0120.00916.38
7.4.110.0140.00316.38
7.4.100.0070.01016.45
7.4.90.0030.01516.29
7.4.80.0070.01019.39
7.4.70.0100.00616.19
7.4.60.0070.01016.39
7.4.50.0000.00916.25
7.4.40.0040.01422.77
7.4.30.0110.00816.31
7.3.330.0050.00013.13
7.3.320.0030.00313.21
7.3.310.0020.00516.22
7.3.300.0000.00616.17
7.3.290.0100.00516.18
7.3.280.0120.00616.12
7.3.270.0090.01517.40
7.3.260.0170.00016.13
7.3.250.0110.00616.28
7.3.240.0120.00616.35
7.3.230.0110.00716.39
7.3.210.0110.01216.19
7.3.200.0140.00719.39
7.3.190.0150.00616.45
7.3.180.0140.00615.97
7.3.170.0030.01516.27
7.3.160.0090.00616.36
7.2.330.0150.00916.14
7.2.320.0140.00616.58
7.2.310.0120.00916.61
7.2.300.0070.01116.54
7.2.290.0120.00616.38
5.4.320.0060.03612.45
5.4.310.0100.04912.45
5.4.300.0060.03612.46
5.4.290.0080.03612.45
5.4.280.0080.04012.35
5.4.270.0080.04912.35
5.4.260.0050.05512.35
5.4.250.0070.03712.35
5.4.240.0050.04512.34
5.4.230.0090.04312.33
5.4.220.0040.03812.33
5.4.210.0040.03612.33
5.4.200.0050.03912.33
5.4.190.0080.03412.32
5.4.180.0110.03812.33
5.4.170.0090.03312.34
5.4.160.0070.03512.33
5.4.150.0080.03512.33
5.4.140.0070.03612.01
5.4.130.0090.04112.00
5.4.120.0060.03511.96
5.4.110.0070.03411.95
5.4.100.0090.03211.95
5.4.90.0050.03711.95
5.4.80.0080.03611.95
5.4.70.0090.03511.95
5.4.60.0050.04211.95
5.4.50.0070.03811.95
5.4.40.0070.03611.94
5.4.30.0070.03511.94
5.4.20.0060.03511.94
5.4.10.0080.03911.93
5.4.00.0070.03411.41
5.3.290.0070.04712.80
5.3.280.0080.03612.71
5.3.270.0070.04712.72
5.3.260.0060.04112.72
5.3.250.0080.04312.72
5.3.240.0050.04712.72
5.3.230.0070.04512.71
5.3.220.0060.04612.68
5.3.210.0090.04412.68
5.3.200.0090.04212.68
5.3.190.0050.04612.67
5.3.180.0070.04312.67
5.3.170.0080.04312.67
5.3.160.0100.04012.67
5.3.150.0090.04312.67
5.3.140.0080.04312.66
5.3.130.0090.04412.66
5.3.120.0080.04412.66
5.3.110.0090.04512.66
5.3.100.0080.04312.12
5.3.90.0080.04512.08
5.3.80.0070.03512.08
5.3.70.0080.04112.08
5.3.60.0090.04112.06
5.3.50.0100.03912.00
5.3.40.0080.04112.00
5.3.30.0050.04211.94
5.3.20.0070.03411.71
5.3.10.0070.03411.68
5.3.00.0040.03811.65

preferences:
52.81 ms | 401 KiB | 5 Q