3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fwrite_with_retry($sock, &$data) { $bytes_to_write = strlen($data); $bytes_written = 0; while ( $bytes_written < $bytes_to_write ) { if ( $bytes_written == 0 ) { $rv = fwrite($sock, $data); } else { $rv = fwrite($sock, substr($data, $bytes_written)); } if ( $rv === false || $rv == 0 ) return( $bytes_written == 0 ? false : $bytes_written ); $bytes_written += $rv; } return $bytes_written; } $fp = fsockopen("localhost", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: 3v4l.org\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite_with_retry($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); }

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.60.0120.00918.93
8.3.50.0110.00722.05
8.3.40.0140.00719.23
8.3.30.0090.00619.47
8.3.20.0040.00420.72
8.3.10.0000.00822.14
8.3.00.0000.00818.14
8.2.180.0110.00716.59
8.2.170.0090.00622.96
8.2.160.0100.00320.60
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0060.01226.16
8.2.120.0050.00321.07
8.2.110.0070.00419.39
8.2.100.0060.00617.97
8.2.90.0000.00819.33
8.2.80.0100.00017.97
8.2.70.0080.00017.63
8.2.60.0040.00418.05
8.2.50.0030.00618.10
8.2.40.0060.00320.20
8.2.30.0090.00018.33
8.2.20.0060.00317.82
8.2.10.0070.00018.20
8.2.00.0040.00417.91
8.1.280.0110.00625.92
8.1.270.0060.00324.11
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0110.00019.65
8.1.230.0000.01217.89
8.1.220.0040.00417.91
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0030.00517.48
8.1.180.0060.00318.10
8.1.170.0030.00618.84
8.1.160.0080.00022.27
8.1.150.0040.00419.04
8.1.140.0040.00417.54
8.1.130.0030.00318.04
8.1.120.0000.00817.57
8.1.110.0000.00817.71
8.1.100.0070.00017.59
8.1.90.0030.00817.48
8.1.80.0020.00517.69
8.1.70.0050.00317.54
8.1.60.0030.00617.69
8.1.50.0000.00817.60
8.1.40.0050.00317.56
8.1.30.0080.00017.63
8.1.20.0000.00817.87
8.1.10.0000.00817.66
8.1.00.0000.00917.61
8.0.300.0000.00718.77
8.0.290.0060.00316.88
8.0.280.0020.00518.59
8.0.270.0080.00017.51
8.0.260.0070.00017.46
8.0.250.0030.00317.04
8.0.240.0030.00317.28
8.0.230.0040.00417.26
8.0.220.0050.00317.11
8.0.210.0040.00417.11
8.0.200.0030.00317.13
8.0.190.0070.00017.22
8.0.180.0070.00017.12
8.0.170.0040.00417.13
8.0.160.0070.00017.04
8.0.150.0050.00317.08
8.0.140.0020.00517.03
8.0.130.0030.00513.72
8.0.120.0000.00817.11
8.0.110.0060.00317.28
8.0.100.0080.00017.19
8.0.90.0080.00017.15
8.0.80.0050.01317.18
8.0.70.0050.00517.12
8.0.60.0080.00017.11
8.0.50.0080.00017.17
8.0.30.0150.00817.23
8.0.20.0110.00917.42
8.0.10.0040.00417.25
8.0.00.0120.00917.08
7.4.330.0030.00615.00
7.4.320.0000.00716.74
7.4.300.0000.00616.63
7.4.290.0030.00316.74
7.4.280.0000.00716.77
7.4.270.0050.00216.57
7.4.260.0050.00216.73
7.4.250.0000.00816.84
7.4.240.0020.00516.81
7.4.230.0000.00716.83
7.4.220.0090.00916.89
7.4.210.0070.01416.82
7.4.200.0040.00416.69
7.4.160.0090.01216.77
7.4.150.0090.00917.40
7.4.140.0060.01417.86
7.4.130.0170.00316.72
7.4.120.0160.00316.70
7.4.110.0070.01516.75
7.4.100.0140.00316.66
7.4.90.0160.00316.70
7.4.80.0090.00919.39
7.4.70.0040.01516.83
7.4.60.0070.01316.82
7.4.50.0040.00416.82
7.4.40.0150.00616.68
7.4.30.0140.00316.68
7.4.00.0060.01015.26
7.3.330.0030.00313.61
7.3.320.0030.00313.40
7.3.310.0020.00516.54
7.3.300.0080.00016.54
7.3.290.0120.00316.66
7.3.280.0100.01016.63
7.3.270.0160.00317.40
7.3.260.0110.00716.73
7.3.240.0110.00716.45
7.3.230.0170.00016.68
7.3.210.0110.00716.75
7.3.200.0040.01319.39
7.3.190.0110.00716.65
7.3.180.0160.00016.67
7.3.170.0130.00316.66
7.3.160.0060.01716.69
7.3.120.0110.00715.20
7.3.10.0040.01016.99
7.3.00.0100.00716.89
7.2.330.0100.01416.77
7.2.320.0090.00916.89
7.2.310.0110.00616.61
7.2.300.0140.00416.79
7.2.290.0140.00916.86
7.2.130.0070.00717.13
7.2.120.0110.00016.84
7.2.110.0030.01317.14
7.2.100.0160.00017.13
7.2.90.0030.00717.10
7.2.80.0000.01417.06
7.2.70.0070.00417.17
7.2.60.0060.00916.94
7.2.50.0100.00617.09
7.2.40.0090.00616.85
7.2.30.0050.00517.19
7.2.20.0070.00316.97
7.2.10.0000.01117.06
7.2.00.0080.00718.37
7.1.250.0030.00615.75
7.1.200.0100.00315.95
7.1.100.0060.00618.37
7.1.70.0000.01417.34
7.1.60.0030.02219.25
7.1.50.0030.01017.34
7.1.00.0070.07322.63
7.0.200.0040.00717.13
7.0.140.0000.07722.47
7.0.60.0130.07720.18
7.0.50.0000.04318.00
7.0.40.0170.07720.37
7.0.30.0470.06320.52
7.0.20.0370.07020.33
7.0.10.0070.04020.29
7.0.00.0070.08320.33
5.6.280.0030.07321.02
5.6.210.0130.07020.92
5.6.200.0100.08318.33
5.6.190.0070.08320.77
5.6.180.0270.03720.75
5.6.170.0200.04720.90
5.6.160.0130.08020.71
5.6.150.0030.04018.38
5.6.140.0030.06018.45
5.6.130.0130.04718.59
5.6.120.0100.07021.10
5.6.110.0130.08021.33
5.6.100.0170.03721.36
5.6.90.0070.04021.15
5.6.80.0100.06320.57
5.5.350.0200.03020.50
5.5.340.0100.04718.21
5.5.330.0130.04320.52
5.5.320.0300.08020.53
5.5.310.0270.04720.40
5.5.300.0070.05718.15
5.5.290.0070.04318.13
5.5.280.0130.06720.84
5.5.270.0100.07021.02
5.5.260.0130.06321.02
5.5.250.0030.04020.93
5.5.240.0130.06720.47
5.4.450.0400.03719.55
5.4.440.0270.04019.56
5.4.430.0430.04319.59
5.4.420.0170.05319.56
5.4.410.0170.05719.61
5.4.400.0130.04319.20
5.4.390.0100.04719.36
5.4.380.0330.07718.96
5.4.370.0370.05318.80
5.4.360.0300.05319.05
5.4.350.0370.05018.81
5.4.340.0430.04718.64
5.4.320.0060.04212.62
5.4.310.0050.03912.62
5.4.300.0080.03512.63
5.4.290.0070.04012.62
5.4.280.0100.04012.51
5.4.270.0050.03812.52
5.4.260.0050.03912.52
5.4.250.0050.04012.52
5.4.240.0030.03912.52
5.4.230.0030.04212.50
5.4.220.0040.03812.50
5.4.210.0020.04012.51
5.4.200.0080.03812.50
5.4.190.0040.03812.50
5.4.180.0050.03712.50
5.4.170.0080.03512.52
5.4.160.0060.03612.51
5.4.150.0090.03412.51
5.4.140.0030.04012.19
5.4.130.0090.03312.18
5.4.120.0040.04212.14
5.4.110.0070.03612.14
5.4.100.0040.03812.14
5.4.90.0040.04012.13
5.4.80.0070.03712.13
5.4.70.0050.03712.13
5.4.60.0060.03512.13
5.4.50.0050.03712.13
5.4.40.0060.03512.12
5.4.30.0070.03512.11
5.4.20.0090.03312.12
5.4.10.0060.03612.12
5.4.00.0080.03411.60
5.3.290.0080.04112.82
5.3.280.0080.03612.75
5.3.270.0050.04512.75
5.3.260.0080.03712.76
5.3.250.0080.03712.76
5.3.240.0070.03612.76
5.3.230.0060.04012.75
5.3.220.0030.04112.72
5.3.210.0060.04012.71
5.3.200.0040.03912.72
5.3.190.0070.04012.72
5.3.180.0100.04912.73
5.3.170.0080.04112.72
5.3.160.0110.04012.72
5.3.150.0120.04312.72
5.3.140.0060.04112.70
5.3.130.0030.04612.70
5.3.120.0090.04112.70
5.3.110.0110.03912.70
5.3.100.0060.04112.19
5.3.90.0100.06212.17
5.3.80.0060.05012.17
5.3.70.0090.03812.16
5.3.60.0100.04612.15
5.3.50.0120.06312.09
5.3.40.0140.04912.10
5.3.30.0110.05412.06
5.3.20.0080.04711.84
5.3.10.0090.04511.80
5.3.00.0050.04511.79
5.2.170.0100.0389.29
5.2.160.0040.0329.29
5.2.150.0050.0319.29
5.2.140.0060.0319.29
5.2.130.0040.0319.24
5.2.120.0040.0309.25
5.2.110.0040.0319.26
5.2.100.0050.0299.25
5.2.90.0020.0339.25
5.2.80.0050.0349.25
5.2.70.0050.0379.25
5.2.60.0030.0339.20
5.2.50.0030.0329.17
5.2.40.0020.0339.15
5.2.30.0030.0329.13
5.2.20.0060.0299.11
5.2.10.0030.0319.01
5.2.00.0060.0318.88
5.1.60.0070.0298.16
5.1.50.0050.0288.16
5.1.40.0070.0308.14
5.1.30.0070.0348.49
5.1.20.0040.0298.51
5.1.10.0060.0278.23
5.1.00.0040.0288.23
5.0.50.0060.0236.71
5.0.40.0070.0186.57
5.0.30.0040.0326.39
5.0.20.0020.0216.34
5.0.10.0010.0236.32
5.0.00.0030.0336.30
4.4.90.0030.0164.78
4.4.80.0030.0164.76
4.4.70.0040.0144.75
4.4.60.0030.0164.75
4.4.50.0010.0184.77
4.4.40.0060.0234.71
4.4.30.0060.0134.75
4.4.20.0050.0174.85
4.4.10.0080.0214.85
4.4.00.0010.0284.76
4.3.110.0060.0144.67
4.3.100.0040.0164.66
4.3.90.0020.0184.63
4.3.80.0030.0244.59
4.3.70.0030.0144.63
4.3.60.0040.0134.63
4.3.50.0030.0154.63
4.3.40.0040.0234.57
4.3.30.0040.0143.38
4.3.20.0010.0173.36
4.3.10.0030.0163.21
4.3.00.0070.01015.27

preferences:
46.05 ms | 401 KiB | 5 Q