3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "https://101@dev.ewingirrigation.com/rest/"; $api_key = 'gSJ5^sVWAWb=L#HAyVXd^WK+_WpX2kew'; $ts = time(); $salt = substr($ts,0,-2); $hash = hash("sha256", $api_key.$salt); $postfields = Array( 'hash' => $hash, 'ts' => $ts ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, utf8_encode(json_encode($postfields))); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded')); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp'); $response = curl_exec($ch) or die('no curl '.curl_error($ch)); $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE); $header = substr($response, 0, $header_size); $body = substr($response, $header_size); echo "<pre>"; echo $header; echo "<hr>"; print_r($body);

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)
7.2.60.0030.01016.82
7.2.00.0070.00319.59
7.1.200.0030.01015.75
7.1.70.0070.00017.09
7.1.60.0030.00917.26
7.1.50.0110.00016.98
7.1.00.0000.08022.38
7.0.200.0100.00316.48
7.0.90.0170.04019.89
7.0.80.0100.04320.00
7.0.70.0030.05020.05
7.0.60.0100.04319.97
7.0.50.0130.03020.26
7.0.40.0100.05320.07
7.0.30.0000.05020.05
7.0.20.0070.04020.15
7.0.10.0070.06320.04
7.0.00.0170.04720.14
5.6.280.0030.07321.09
5.6.240.0030.04320.67
5.6.230.0100.07320.62
5.6.220.0030.04720.59
5.6.210.0030.04720.59
5.6.200.0070.04721.05
5.6.190.0000.04321.03
5.6.180.0100.03721.07
5.6.170.0030.04321.10
5.6.160.0100.05021.02
5.6.150.0100.03721.11
5.6.140.0100.03021.11
5.6.130.0030.03721.01
5.6.120.0000.04020.96
5.6.110.0030.06020.94
5.6.100.0070.04021.02
5.6.90.0000.04720.91
5.6.80.0030.04320.48
5.6.70.0070.03720.40
5.6.60.0000.04320.42
5.6.50.0070.03320.42
5.6.40.0070.04320.32
5.6.30.0000.04320.43
5.6.20.0100.04020.38
5.6.10.0070.04020.45
5.6.00.0030.04020.43
5.5.380.0000.07320.49
5.5.370.0130.07320.39
5.5.360.0030.04320.32
5.5.350.0070.08320.45
5.5.340.0100.03020.84
5.5.330.0030.04020.90
5.5.320.0070.04020.84
5.5.310.0000.04720.91
5.5.300.0030.04020.87
5.5.290.0100.03720.77
5.5.280.0030.05020.76
5.5.270.0000.04720.91
5.5.260.0070.04020.86
5.5.250.0030.04720.70
5.5.240.0070.03320.28
5.5.230.0070.03720.04
5.5.220.0070.05720.14
5.5.210.0070.04020.30
5.5.200.0100.03320.27
5.5.190.0000.04720.14
5.5.180.0070.03320.10
5.5.160.0070.04320.20
5.5.150.0030.04020.28
5.5.140.0000.04320.29
5.5.130.0070.05320.09
5.5.120.0070.03720.09
5.5.110.0070.03720.22
5.5.100.0000.04320.05
5.5.90.0070.03720.17
5.5.80.0030.04719.98
5.5.70.0000.03720.07
5.5.60.0100.05020.04
5.5.50.0000.08020.15
5.5.40.0100.07720.13
5.5.30.0100.07320.11
5.5.20.0000.08320.06
5.5.10.0030.08020.11
5.5.00.0070.07719.96

preferences:
27.02 ms | 403 KiB | 5 Q