3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $username = 'stn'; $password = '$ta7$T5d'; $url = 'https://purpleportal.net/api/location/v1/ping'; $token = base64_encode($username . ':' . $password); $curl = curl_init(); $headers = [ "Content-Type: application/json", "Authorization: basic " . $token, ]; curl_setopt_array($curl, [ CURLOPT_RETURNTRANSFER => 1, CURLOPT_HEADER => true, CURLOPT_URL => $url, CURLOPT_HTTPHEADER => $headers ]); $output = curl_exec($curl); // $info = curl_getinfo($curl, CURLINFO_HTTP_CODE); // var_dump($info); var_dump($output);

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0060.00916.88
7.2.00.0000.00919.57
7.1.200.0100.00015.82
7.1.100.0070.00718.04
7.1.70.0000.00717.00
7.1.60.0060.01920.03
7.1.50.0070.01416.54
7.1.00.0030.07722.41
7.0.200.0620.00614.64
7.0.60.0030.09020.03
7.0.50.0070.05017.88
7.0.40.0000.07020.05
7.0.30.0200.05020.22
7.0.20.0200.08320.17
7.0.10.0170.07720.13
7.0.00.0130.07020.00
5.6.280.0070.06320.98
5.6.210.0030.08320.76
5.6.200.0170.07018.21
5.6.190.0070.08720.39
5.6.180.0170.07720.77
5.6.170.0270.08020.32
5.6.160.0030.04320.37
5.6.150.0100.05718.22
5.6.140.0030.06718.11
5.6.130.0030.04018.22
5.6.120.0100.07321.11
5.6.110.0070.06721.10
5.6.100.0100.05320.97
5.6.90.0070.06721.01
5.6.80.0000.04320.36
5.6.70.2400.06020.38
5.5.350.0200.08320.33
5.5.340.0000.04317.91
5.5.330.0070.05320.21
5.5.320.3700.04720.27
5.5.310.0300.07320.24
5.5.300.0030.04317.91
5.5.290.0030.05717.92
5.5.280.0130.07020.77
5.5.270.0100.08320.73
5.5.260.0100.07720.76
5.5.250.0100.05720.79
5.5.240.0200.05720.24
5.4.450.0630.06019.12
5.4.440.0800.05719.13
5.4.430.0630.05019.48
5.4.420.0700.06019.15
5.4.410.0600.05319.39
5.4.400.0670.04719.20
5.4.390.0430.06319.14
5.4.380.0630.05019.16
5.4.370.0800.03319.19
5.4.360.0600.04319.28
5.4.350.0570.05719.20
5.4.340.0630.06319.33
5.4.320.0470.07318.99
5.4.310.0530.05018.99
5.4.300.0430.05719.00
5.4.290.0770.05018.77
5.4.280.0430.05719.27
5.4.270.0530.04718.99
5.4.260.0470.06018.77
5.4.250.0500.05018.98
5.4.240.0130.06719.30
5.4.230.0100.07319.33
5.4.220.0200.06719.19
5.4.210.0600.05319.16
5.4.200.0670.05019.14
5.4.190.0600.05719.25
5.4.180.0830.06719.30
5.4.170.0630.06719.15
5.4.160.0600.05319.13
5.4.150.0670.05718.97
5.4.140.0670.05016.42
5.4.130.0500.06316.48
5.4.120.0570.05016.37
5.4.110.0570.05316.07
5.4.100.0630.04316.49
5.4.90.0670.04016.52
5.4.80.0500.04716.41
5.4.70.0030.05016.37
5.4.60.0200.07316.36
5.4.50.0070.06716.36
5.4.40.0370.05716.43
5.4.30.0170.03716.39
5.4.20.0330.06316.19
5.3.290.0800.03315.16
5.3.280.1700.04015.16
5.3.270.1430.04015.16
5.3.260.0030.03715.16
5.3.250.0100.04015.16
5.3.240.1530.02715.16
5.3.230.1600.03315.16
5.3.220.0830.03315.16
5.3.210.0770.03315.16
5.3.200.1070.04315.16
5.3.190.1300.03715.16
5.3.180.1170.04315.16