3v4l.org

run code in 300+ PHP versions simultaneously
<?php function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } function storefile() { $filename = "10mb.test"; //$time_start = microtime_float(); $filecontent = file_get_contents("http://cachefly.cachefly.net/10mb.test"); //$time_end = microtime_float(); //$time = $time_end - $time_start; //$speed = 10 / $time; //echo "File Downloaded with" . $speed . " Mb/s of speed."; apc_store($filename,$filecontent); } function fetchfile() { $filename = "10mb.test"; $file = apc_fetch($filename); $quoted = sprintf('"%s"', addcslashes(basename($filename), '"\\')); $size = filesize($file); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . $quoted); header('Content-Transfer-Encoding: binary'); header('Connection: Keep-Alive'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . $size); echo $file; } storefile(); fetchfile();

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.00.0010.00926.16
8.2.30.0080.01017.62
8.2.20.0050.00519.40
8.2.10.0180.00017.62
8.2.00.0150.00417.63
8.1.160.0000.01617.62
8.1.150.0120.00617.62
8.1.140.0080.01117.62
8.1.130.0070.01017.62
8.1.120.0130.00317.62
8.1.110.0060.01117.62
8.1.100.0130.00417.60
8.1.90.0090.00817.57
8.1.80.0110.00617.53
8.1.70.0150.00317.63
8.1.60.0170.00217.66
8.1.50.0160.00317.68
8.1.40.0140.00617.67
8.1.30.0180.00317.69
8.1.20.0140.00717.74
8.1.10.0120.00517.65
8.1.00.0170.00417.63
8.0.280.0140.00317.62
8.0.270.0100.00617.62
8.0.260.0120.00417.62
8.0.250.0070.00717.62
8.0.240.0080.00817.62
8.0.230.0090.00417.35
8.0.220.0170.00117.33
8.0.210.0050.01417.35
8.0.200.0080.00817.42
8.0.190.0120.00517.32
8.0.180.0100.00717.14
8.0.170.0130.00417.21
8.0.160.0130.00517.19
8.0.150.0120.00317.17
8.0.140.0130.00517.07
8.0.130.0130.00617.10
8.0.120.0120.00516.27
8.0.110.0120.00516.28
8.0.100.0120.00616.26
8.0.90.0090.00616.48
8.0.80.0100.00416.50
8.0.70.0090.00616.48
8.0.60.0120.00316.48
8.0.50.0100.00416.48
8.0.30.0100.00516.50
8.0.20.0100.00616.56
8.0.10.0140.00516.57
8.0.00.0090.00516.67
7.4.330.0130.00017.62
7.4.320.0160.00017.62
7.4.300.0140.00317.13
7.4.290.0070.00616.87
7.4.280.0180.00216.87
7.4.270.0160.00416.89
7.4.260.0140.00316.77
7.4.250.0150.00416.01
7.4.240.0120.00615.98
7.4.230.0110.00616.01
7.4.220.0100.00416.22
7.4.210.0080.00616.31
7.4.200.0090.00516.18
7.4.190.0090.00516.26
7.4.180.0070.00716.28
7.4.160.0110.00416.31
7.4.150.0110.00416.26
7.4.140.0110.00516.23
7.4.130.0140.00516.25
7.4.120.0090.00716.25
7.4.110.0110.00516.24
7.4.100.0100.00516.34
7.4.90.0100.00516.30
7.4.80.0110.00716.33
7.4.70.0120.00516.32
7.4.60.0100.00616.33
7.4.50.0110.00616.29
7.4.40.0100.00716.36
7.4.30.0110.00716.38
7.4.20.0100.00816.40
7.4.10.0080.00916.40
7.4.00.0100.00716.40
7.3.330.0140.00316.70
7.3.320.0110.00516.16
7.3.310.0110.00515.84
7.3.300.0130.00315.84
7.3.290.0090.00516.06
7.3.280.0110.00416.07
7.3.270.0110.00516.15
7.3.260.0140.00316.11
7.3.250.0100.00616.09
7.3.240.0120.00416.11
7.3.230.0120.00516.17
7.3.220.0110.00616.02
7.3.210.0120.00316.02
7.3.200.0110.00516.04
7.3.190.0120.00416.11
7.3.180.0100.00716.11
7.3.170.0100.00716.19
7.3.160.0130.00616.26
7.3.150.0120.00616.27
7.3.140.0110.00716.29
7.3.130.0100.00716.30
7.3.120.0110.00616.27
7.3.110.0090.00816.19
7.3.100.0110.00716.22
7.3.90.0100.00716.30
7.3.80.0110.00616.18
7.3.70.0100.00816.12
7.3.60.0120.00716.13
7.3.50.0090.00816.13
7.3.40.0100.00816.04
7.3.30.0090.00816.06
7.3.20.0110.00716.53
7.3.10.0120.00816.51
7.3.00.0120.00916.50
7.2.340.0100.00716.19
7.2.330.0120.00516.20
7.2.320.0100.00716.27
7.2.310.0110.00616.34
7.2.300.0130.00716.30
7.2.290.0100.00816.41
7.2.280.0120.00616.50
7.2.270.0110.00716.45
7.2.260.0100.00816.42
7.2.250.0110.00716.39
7.2.240.0110.00816.38
7.2.230.0100.00916.37
7.2.220.0120.00716.40
7.2.210.0100.00916.30
7.2.200.0110.00916.37
7.2.190.0110.00716.27
7.2.180.0110.00716.31
7.2.170.0110.00716.22
7.2.160.0100.00816.27
7.2.150.0120.00816.74
7.2.140.0150.00716.78
7.2.130.0130.00816.79
7.2.120.0120.00916.72
7.2.110.0120.00816.73
7.2.100.0150.00716.74
7.2.90.0140.00716.74
7.2.80.0120.00916.68
7.2.70.0160.00816.72
7.2.60.0120.00916.70
7.2.50.0160.00816.72
7.2.40.0210.00816.76
7.2.30.0200.00716.79
7.2.20.0200.00816.76
7.2.10.0180.00816.75
7.2.00.0230.00816.78
7.1.330.0170.00715.83
7.1.320.0190.00715.84
7.1.310.0140.00815.72
7.1.300.0140.00815.70
7.1.290.0170.00615.65
7.1.280.0130.00815.64
7.1.270.0130.00815.66
7.1.260.0140.00815.67
7.1.250.0130.00815.60
7.1.240.0160.00715.54
7.1.230.0170.00715.55
7.1.220.0160.00715.58
7.1.210.0160.00715.55
7.1.200.0180.00715.60
7.1.190.0180.00715.60
7.1.180.0150.00715.55
7.1.170.0160.00815.54
7.1.160.0230.00615.63
7.1.150.0220.00715.61
7.1.140.0240.00815.62
7.1.130.0240.00715.55
7.1.120.0210.00815.62
7.1.110.0230.00715.63
7.1.100.0220.00815.71
7.1.90.0220.00715.66
7.1.80.0210.00715.68
7.1.70.0200.00715.63
7.1.60.0200.00717.06
7.1.50.0200.00817.12
7.1.40.0190.00817.11
7.1.30.0200.00817.09
7.1.20.0180.00817.10
7.1.10.0170.00815.65
7.1.00.0190.00815.61
7.0.330.0150.00815.30
7.0.320.0150.00715.29
7.0.310.0160.00815.31
7.0.300.0150.00715.29
7.0.290.0230.00715.28
7.0.280.0150.00715.33
7.0.270.0210.00815.40
7.0.260.0230.00715.34
7.0.250.0220.00715.40
7.0.240.0210.00715.45
7.0.230.0230.00715.46
7.0.220.0190.00815.45
7.0.210.0210.00615.38
7.0.200.0240.00815.42
7.0.190.0220.00615.46
7.0.180.0180.00715.40
7.0.170.0170.00815.44
7.0.160.0190.00715.41
7.0.150.0180.00815.38
7.0.140.0180.00715.38
7.0.130.0190.00715.40
7.0.120.0180.00815.41
7.0.110.0200.00715.38
7.0.100.0180.00715.35
7.0.90.0170.00815.36
7.0.80.0160.00715.38
7.0.70.0180.00715.38
7.0.60.0170.00715.34
7.0.50.0180.00715.34
7.0.40.0200.00715.40
7.0.30.0150.00815.38
7.0.20.0180.00615.38
7.0.10.0160.00815.39
7.0.00.0170.00715.38
5.6.400.0130.00915.52
5.6.390.0140.00815.56
5.6.380.0130.00915.50
5.6.370.0120.01015.48
5.6.360.0120.00915.55
5.6.350.0150.00715.50
5.6.340.0120.00915.52
5.6.330.0130.00815.52
5.6.320.0130.00815.53
5.6.310.0130.00815.54
5.6.300.0120.01115.75
5.6.290.0140.01115.82
5.6.280.0130.01115.81
5.6.270.0140.01015.81
5.6.260.0130.01015.74
5.6.250.0130.01115.74
5.6.240.0130.01115.74
5.6.230.0150.01015.76
5.6.220.0130.01015.78
5.6.210.0130.01015.76
5.6.200.0140.01015.78
5.6.190.0130.01215.78
5.6.180.0130.01115.79
5.6.170.0130.01115.79
5.6.160.0140.01015.75
5.6.150.0140.01015.81
5.6.140.0140.01015.78
5.6.130.0110.01315.78
5.6.120.0140.01015.76
5.6.110.0120.01215.73
5.6.100.0110.01215.69
5.6.90.0120.01215.74
5.6.80.0120.01115.63
5.6.70.0120.01115.66
5.6.60.0120.01215.66
5.6.50.0120.01115.63
5.6.40.0120.01115.67
5.6.30.0140.01015.66
5.6.20.0130.01115.65
5.6.10.0120.01115.63
5.6.00.0130.01115.63
5.5.380.0130.01215.41
5.5.370.0120.01115.37
5.5.360.0140.01015.35
5.5.350.0140.01115.34
5.5.340.0140.01015.39
5.5.330.0130.01215.35
5.5.320.0130.01215.38
5.5.310.0140.01115.38
5.5.300.0120.01215.33
5.5.290.0130.01115.40
5.5.280.0120.01115.37
5.5.270.0140.01015.32
5.5.260.0130.01215.32
5.5.250.0130.01215.33
5.5.240.0130.01215.35
5.5.230.0140.01015.32
5.5.220.0130.01215.31
5.5.210.0120.01115.35
5.5.200.0120.01115.31
5.5.190.0130.01115.30
5.5.180.0130.01015.27
5.5.170.0130.00915.25
5.5.160.0130.01015.32
5.5.150.0130.01015.30
5.5.140.0130.01015.23
5.5.130.0130.01115.26
5.5.120.0130.01015.25
5.5.110.0120.01115.26
5.5.100.0130.01115.31
5.5.90.0120.01115.28
5.5.80.0140.01015.29
5.5.70.0130.01115.31
5.5.60.0130.01015.30
5.5.50.0130.01015.29
5.5.40.0110.01215.29
5.5.30.0130.01115.27
5.5.20.0110.01215.29
5.5.10.0130.01015.22
5.5.00.0130.01115.24
5.4.450.0110.00913.02
5.4.440.0100.01012.95
5.4.430.0120.00812.96
5.4.420.0100.00912.94
5.4.410.0110.01012.99
5.4.400.0110.00912.92
5.4.390.0100.00912.93
5.4.380.0110.00912.93
5.4.370.0110.00812.93
5.4.360.0110.00912.94
5.4.350.0100.01012.91
5.4.340.0100.00912.92
5.4.330.0100.00612.56
5.4.320.0120.00712.96
5.4.310.0100.00912.93
5.4.300.0110.00912.93
5.4.290.0100.01012.97
5.4.280.0110.00812.92
5.4.270.0110.00812.97
5.4.260.0110.01012.91
5.4.250.0100.00912.93
5.4.240.0100.00912.92
5.4.230.0110.00912.88
5.4.220.0100.00912.87
5.4.210.0120.00912.87
5.4.200.0100.01012.86
5.4.190.0120.00912.87
5.4.180.0110.00912.83
5.4.170.0110.00812.87
5.4.160.0110.00912.83
5.4.150.0100.00912.83
5.4.140.0100.01012.81
5.4.130.0110.00812.82
5.4.120.0110.00812.82
5.4.110.0110.00912.83
5.4.100.0110.00912.81
5.4.90.0100.00912.81
5.4.80.0110.00812.84
5.4.70.0110.00812.84
5.4.60.0110.00912.80
5.4.50.0110.00812.81
5.4.40.0100.00912.79
5.4.30.0110.00812.80
5.4.20.0110.00912.80
5.4.10.0100.00912.82
5.4.00.0100.00812.70

preferences:
49.18 ms | 401 KiB | 5 Q