3v4l.org

run code in 300+ PHP versions simultaneously
<?php curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); $var = "testing module"; $statement = 'This is a $var'; echo ($statement); $var = "testing module"; $statement = "This is a $var"; echo ($statement); $arr = array("foo","bar","baz"); for ( $i = 0; $i < count($arr); $i++){ $item = $arr[$i]; } echo "<pre>"; print_r($item); echo "</pre>"; $a = 3; print '$a'; echo '$a'; print "$a"; echo "$a"; $array = array(array(141,151,161), 2, 3, array(101, 202, 303)); function DisplayArray($array) { foreach ($array as $value) { if (is_array($value)) { DisplayArray($value); } else { echo $value . " "; } } } DisplayArray($array); echo 0x10; ?>

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.4.20.0030.01618.01
8.4.10.0030.00617.97
8.3.150.0030.00516.98
8.3.140.0030.00520.76
8.3.130.0000.00818.61
8.3.120.0080.00018.61
8.3.110.0100.00020.94
8.3.100.0110.00816.63
8.3.90.0080.00026.77
8.3.80.0120.00017.97
8.3.70.0150.00316.75
8.3.60.0100.01018.18
8.3.50.0090.01221.92
8.3.40.0080.00818.79
8.3.30.0040.01118.70
8.3.20.0040.00420.04
8.3.10.0060.00320.67
8.3.00.0040.00420.46
8.2.270.0120.00616.86
8.2.260.0040.00416.41
8.2.250.0080.00018.57
8.2.240.0080.01116.85
8.2.230.0060.00322.58
8.2.220.0050.00324.06
8.2.210.0090.00926.77
8.2.200.0030.00616.50
8.2.190.0070.00718.40
8.2.180.0140.00016.50
8.2.170.0040.01222.96
8.2.160.0100.00322.13
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00421.12
8.2.120.0040.00426.35
8.2.110.0090.00019.27
8.2.100.0110.00017.91
8.2.90.0040.00419.27
8.2.80.0050.00317.97
8.2.70.0050.00317.63
8.2.60.0050.00317.68
8.2.50.0030.00618.09
8.2.40.0000.00820.42
8.2.30.0070.00019.25
8.2.20.0000.00717.60
8.2.10.0020.00517.98
8.2.00.0040.00417.90
8.1.310.0000.00816.60
8.1.300.0150.00418.42
8.1.290.0060.00330.84
8.1.280.0040.01825.92
8.1.270.0030.00523.83
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0090.00022.46
8.1.230.0070.00417.82
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0040.00417.13
8.1.190.0000.00917.22
8.1.180.0060.00318.10
8.1.170.0000.00818.52
8.1.160.0040.00420.59
8.1.150.0000.00718.68
8.1.140.0030.00519.49
8.1.130.0000.00817.49
8.1.120.0000.00717.32
8.1.110.0040.00417.26
8.1.100.0040.00417.37
8.1.90.0070.00017.38
8.1.80.0040.00417.34
8.1.70.0030.00817.32
8.1.60.0040.00417.38
8.1.50.0000.00817.45
8.1.40.0040.00417.39
8.1.30.0030.00617.59
8.1.20.0040.00417.43
8.1.10.0040.00417.38
8.1.00.0050.00217.46
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00318.37
8.0.270.0070.00017.20
8.0.260.0000.00717.20
8.0.250.0000.01016.98
8.0.240.0000.00716.87
8.0.230.0080.00016.83
8.0.220.0060.00316.91
8.0.210.0000.00716.89
8.0.200.0000.00616.95
8.0.190.0120.00516.85
8.0.180.0050.00216.98
8.0.170.0000.01016.79
8.0.160.0000.00717.00
8.0.150.0050.00316.71
8.0.140.0070.00016.84
8.0.130.0030.00313.32
8.0.120.0070.00016.88
8.0.110.0000.00816.89
8.0.100.0070.00016.76
8.0.90.0030.00316.87
8.0.80.0060.01016.78
8.0.70.0000.00816.81
8.0.60.0030.00516.76
8.0.50.0000.00716.80
8.0.30.0050.01116.91
8.0.20.0130.01117.40
8.0.10.0040.00416.84
8.0.00.0070.01116.75
7.4.330.0000.00516.66
7.4.320.0060.00016.56
7.4.300.0000.00616.45
7.4.290.0000.00716.46
7.4.280.0040.00416.30
7.4.270.0000.00716.38
7.4.260.0100.00016.43
7.4.250.0000.00716.44
7.4.240.0040.00416.43
7.4.230.0070.00016.56
7.4.220.0040.01516.63
7.4.210.0070.00816.48
7.4.200.0000.00716.57
7.4.160.0090.00616.45
7.4.150.0160.00917.40
7.4.140.0120.01317.86
7.4.130.0050.01516.58
7.4.120.0160.00416.43
7.4.110.0030.01316.52
7.4.100.0120.00616.66
7.4.90.0090.00916.48
7.4.80.0120.00919.39
7.4.70.0100.00616.32
7.4.60.0070.01116.33
7.4.50.0110.00716.50
7.4.40.0070.01016.52
7.4.30.0090.00616.52
7.4.10.0060.01214.83
7.4.00.0080.00914.88
7.3.330.0050.00013.32
7.3.320.0080.00013.32
7.3.310.0000.00716.25
7.3.300.0030.00316.34
7.3.290.0000.00716.29
7.3.280.0110.00816.28
7.3.270.0120.01217.40
7.3.260.0090.00916.31
7.3.250.0110.00716.34
7.3.240.0110.00616.39
7.3.230.0160.00316.42
7.3.210.0140.00316.57
7.3.200.0110.00416.48
7.3.190.0090.00916.45
7.3.180.0130.01016.34
7.3.170.0060.01216.19
7.3.160.0030.01216.32
7.3.130.0070.01114.20
7.3.120.0100.01014.75
7.3.110.0150.00314.52
7.3.100.0060.00314.53
7.3.90.0120.00614.88
7.3.80.0050.01014.73
7.3.70.0040.01114.47
7.3.60.0070.01014.44
7.3.50.0060.01214.73
7.3.40.0080.00414.27
7.3.30.0110.00414.36
7.3.20.0090.00616.51
7.3.10.0160.00716.23
7.3.00.0130.00516.30
7.2.330.0060.01716.54
7.2.320.0100.01316.38
7.2.310.0060.01216.34
7.2.300.0070.01616.29
7.2.290.0150.00616.56
7.2.260.0070.01015.09
7.2.250.0060.00914.87
7.2.240.0030.01214.86
7.2.230.0030.01414.57
7.2.220.0040.01114.38
7.2.210.0060.00914.68
7.2.200.0070.00714.46
7.2.190.0040.01414.46
7.2.180.0060.00914.61
7.2.170.0030.00614.80
7.2.160.0030.01014.38
7.2.150.0110.00416.62
7.2.140.0030.01216.46
7.2.130.0100.01016.57
7.2.120.0120.01016.35
7.2.110.0120.00816.65
7.2.100.0110.00916.78
7.2.90.0070.00916.58
7.2.80.0090.00816.83
7.2.70.0120.00816.69
7.2.60.0070.00916.78
7.2.50.0120.00516.47
7.2.40.0080.00916.50
7.2.30.0080.00516.61
7.2.20.0120.00716.22
7.2.10.0110.00716.38
7.2.00.0090.00717.31
7.1.330.0060.00615.16
7.1.320.0000.01315.69
7.1.310.0030.00915.43
7.1.300.0090.00315.41
7.1.290.0070.01015.07
7.1.280.0000.01615.25
7.1.270.0040.00815.51
7.1.260.0030.00915.23
7.1.250.0040.01315.30
7.1.240.0070.00715.55
7.1.230.0000.01015.55
7.1.220.0080.00315.73
7.1.210.0110.00015.33
7.1.200.0070.00315.46
7.1.190.0050.00515.75
7.1.180.0060.00915.68
7.1.170.0070.00715.50
7.1.160.0100.00315.44
7.1.150.0040.01115.65
7.1.140.0060.00315.26
7.1.130.0040.01115.38
7.1.120.0100.00315.48
7.1.110.0110.00415.36
7.1.100.0010.00716.61
7.1.90.0090.00615.31
7.1.80.0000.01515.44
7.1.70.0050.00315.91
7.1.60.0060.01117.31
7.1.50.0100.00616.12
7.1.40.0030.00615.40
7.1.30.0000.01115.61
7.1.20.0100.00315.63
7.1.10.0030.00615.49
7.1.00.0060.03918.81
7.0.330.0030.01415.22
7.0.320.0060.00615.24
7.0.310.0090.00615.17
7.0.300.0040.01115.43
7.0.290.0100.00315.28
7.0.280.0040.00814.80
7.0.270.0100.00014.99
7.0.260.0030.00715.19
7.0.250.0060.00614.89
7.0.240.0040.00715.17
7.0.230.0040.01115.23
7.0.220.0090.00615.06
7.0.210.0030.00615.47
7.0.200.0250.00815.13
7.0.190.0060.00615.15
7.0.180.0040.00715.13
7.0.170.0070.00715.39
7.0.160.0090.00615.46
7.0.150.0100.00315.37
7.0.140.0100.00315.25
7.0.130.0090.00615.20
7.0.120.0050.00815.31
7.0.110.0000.01115.34
7.0.100.0060.00615.42
7.0.90.0050.00515.23
7.0.80.0060.00615.37
7.0.70.0030.00715.51
7.0.60.0070.04518.56
7.0.50.0000.02916.63
7.0.40.0050.04916.70
7.0.30.0080.02716.86
7.0.20.0200.04216.54
7.0.10.0020.02916.86
7.0.00.0020.02516.83
5.6.400.0110.00414.16
5.6.390.0030.01314.43
5.6.380.0120.00314.34
5.6.370.0090.00614.19
5.6.360.0000.01414.27
5.6.350.0040.00414.00
5.6.340.0070.00713.96
5.6.330.0000.01013.80
5.6.320.0130.00013.89
5.6.310.0000.01514.04
5.6.300.0040.00713.93
5.6.290.0070.00714.29
5.6.280.0040.00414.08
5.6.270.0060.00614.04
5.6.260.0040.00714.03
5.6.250.0050.00513.91
5.6.240.0070.01013.78
5.6.230.0060.00914.07
5.6.220.0100.00314.14
5.6.210.0070.04517.36
5.6.200.0060.04516.21
5.6.190.0020.02717.41
5.6.180.0130.02717.34
5.6.170.0200.03117.38
5.6.160.0110.02517.29
5.6.150.0020.03916.05
5.6.140.0070.04616.25
5.6.130.0060.03316.12
5.6.120.0140.03817.59
5.6.110.0080.04817.49
5.6.100.0080.04617.73
5.6.90.0080.04117.42
5.6.80.0130.03517.41
5.6.70.0110.00413.98
5.6.60.0040.01114.16
5.6.50.0030.01013.90
5.6.40.0090.00314.05
5.6.30.0000.01413.86
5.6.20.0030.01014.09
5.6.10.0040.00413.82
5.6.00.0030.00714.09
5.5.380.0120.00313.84
5.5.370.0030.00914.04
5.5.360.0030.01214.21
5.5.350.0200.03617.15
5.5.340.0120.03716.03
5.5.330.0120.03817.33
5.5.320.0150.04517.20
5.5.310.0130.02517.23
5.5.300.0000.02815.99
5.5.290.0080.02815.97
5.5.280.0100.04317.50
5.5.270.0110.04217.47
5.5.260.0070.02217.43
5.5.250.0080.04317.50
5.5.240.0130.03317.12
5.5.230.0030.01014.19
5.5.220.0070.00714.25
5.5.210.0090.00313.93
5.5.200.0090.00613.76
5.5.190.0070.00713.92
5.5.180.0030.01014.02
5.5.170.0030.00613.64
5.5.160.0100.00013.58
5.5.150.0030.01013.84
5.5.140.0110.00414.15
5.5.130.0050.00513.80
5.5.120.0040.01113.72
5.5.110.0040.01213.97
5.5.100.0040.01113.83
5.5.90.0100.00713.92
5.5.80.0090.00613.78
5.5.70.0000.01614.05
5.5.60.0060.00913.82
5.5.50.0060.00614.21
5.5.40.0060.00613.77
5.5.30.0000.01214.11
5.5.20.0090.00314.00
5.5.10.0040.01113.95
5.5.00.0040.01114.07

preferences:
25.98 ms | 403 KiB | 5 Q