3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('memory_limit', '512M'); echo "Memory limit: ", ini_get('memory_limit'), "\n\n"; $finfo = new finfo(FILEINFO_MIME_TYPE); $minSize = 128 * 1024; $maxSize = 16 * 1024 * 1024; for($size = $minSize; $size <= $maxSize; $size *= 2) { $content = str_repeat('0', $size); echo "Content size: ", number_format(strlen($content)/1024/1024, 1), "M\n"; $finfo->buffer($content); echo "Peak memory usage: ", number_format(memory_get_peak_usage(true)/1024/1024, 1), "M\n\n"; }

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.0500.09048.83
8.3.50.0390.08948.75
8.3.40.0330.12452.05
8.3.30.0490.12551.32
8.3.20.0270.06053.93
8.3.10.0200.05552.98
8.3.00.0170.05454.45
8.2.180.0370.04748.81
8.2.170.0460.05351.04
8.2.160.0400.06351.81
8.2.150.0240.03052.91
8.2.140.0230.03052.91
8.2.130.0230.04353.06
8.2.120.0240.03452.01
8.2.110.0200.06353.01
8.2.100.0400.06452.46
8.1.280.0640.05447.78
8.1.270.0260.04054.16
8.1.260.0390.06951.20
8.1.250.0260.03652.73
8.1.240.0340.06050.76
8.1.230.0320.04950.92
7.4.70.5510.547183.78
7.4.60.5430.533183.59
7.4.50.5450.555183.58
7.4.40.6100.569183.55
7.4.30.6070.561183.47
7.4.20.5340.520183.43
7.4.10.5500.526183.62
7.4.00.5770.543183.67
7.3.190.6450.807183.51
7.3.180.5440.766183.31
7.3.170.5960.879183.55
7.3.160.5760.823183.39
7.3.150.5610.801183.29
7.3.140.5480.762183.18
7.3.130.6020.806183.41
7.3.120.5450.757183.44
7.3.110.5670.796183.43
7.3.100.5700.848183.58
7.3.90.6130.857183.24
7.3.80.5490.769183.36
7.3.70.5630.861183.42
7.3.60.6010.776183.49
7.3.50.5270.739183.32
7.3.40.4980.762183.29
7.3.30.5040.735183.30
7.3.20.7960.759183.93
7.3.10.7820.718183.95
7.3.00.8830.772184.00
7.2.310.4030.380175.05
7.2.300.4030.463174.87
7.2.290.3930.466175.03
7.2.280.4000.467174.87
7.2.270.4850.509174.96
7.2.260.3980.424174.99
7.2.250.4120.518175.04
7.2.240.3890.403174.92
7.2.230.4020.464174.90
7.2.220.4300.412175.03
7.2.210.3830.388175.12
7.2.200.3690.399174.97
7.2.190.4050.377174.89
7.2.180.3830.386174.92
7.2.170.3740.393175.00
7.2.160.3660.392175.00
7.2.150.4140.369175.91
7.2.140.3900.376175.84
7.2.130.4170.354175.89
7.2.120.4110.410175.99
7.2.110.3720.404175.92
7.2.100.3610.403176.01
7.2.90.4750.397176.08
7.2.80.4070.378175.98
7.2.70.3980.389176.00
7.2.60.4080.421176.08
7.2.50.3970.426176.04
7.2.40.4130.398176.01
7.2.30.4150.431176.02
7.2.20.3950.405176.01
7.2.10.4510.423175.85
7.2.00.4190.399175.99
7.1.330.5980.388172.52
7.1.320.5360.288172.66
7.1.310.5090.294172.50
7.1.300.4330.282172.54
7.1.290.3870.280172.56
7.1.280.3860.238172.39
7.1.270.3810.272172.43
7.1.260.3790.234172.41
7.1.250.3700.264172.63
7.1.240.3660.273172.47
7.1.230.3960.336172.47
7.1.220.3820.269172.32
7.1.210.4340.239172.40
7.1.200.4480.249172.53
7.1.190.5030.268172.48
7.1.180.4950.343172.68
7.1.170.4490.236172.54
7.1.160.4170.251172.68
7.1.150.3950.239172.46
7.1.140.4840.244172.71
7.1.130.4420.294172.75
7.1.120.4030.293172.65
7.1.110.5320.323172.49
7.1.100.4600.298172.62
7.1.90.6220.310172.75
7.1.80.4200.255172.48
7.1.70.4170.269172.46
7.1.60.5610.285172.58
7.1.50.4590.287172.66
7.1.40.4440.221172.89
7.1.30.4110.276172.57
7.1.20.4750.214172.57
7.1.10.4110.224172.67
7.1.00.4820.339172.50
7.0.330.4290.319172.35
7.0.320.3890.267172.41
7.0.310.4100.266172.56
7.0.300.4070.249172.47
7.0.290.3940.252172.43
7.0.280.3940.276172.38
7.0.270.4390.244172.25
7.0.260.6230.346172.36
7.0.250.5160.270172.37
7.0.240.5480.312172.40
7.0.230.4670.219172.36
7.0.220.4200.207172.29
7.0.210.4110.289172.31
7.0.200.5430.373172.45
7.0.190.4410.271172.29
7.0.180.4060.248172.31
7.0.170.3900.260172.36
7.0.160.4010.254172.06
7.0.150.3850.274172.39
7.0.140.4140.277172.26
7.0.130.4270.268172.21
7.0.120.4200.251172.39
7.0.110.4560.328172.22
7.0.100.4680.291172.09
7.0.90.5470.341172.25
7.0.80.5190.278172.39
7.0.70.4040.286172.20
7.0.60.3440.281172.26
7.0.50.4030.309172.31
7.0.40.4040.241172.31
7.0.30.5470.344172.34
7.0.20.5050.250172.39
7.0.10.4760.232172.25
7.0.00.4680.363172.20
5.6.400.3580.291179.38
5.6.390.3840.237179.63
5.6.380.4020.256179.20
5.6.370.3810.249179.61
5.6.360.3670.259179.45
5.6.350.4400.331179.33
5.6.340.3710.246179.37
5.6.330.3210.292179.56
5.6.320.4860.308179.63
5.6.310.3720.299179.66
5.6.300.4130.246179.41
5.6.290.4140.245179.69
5.6.280.3800.252179.55
5.6.270.3850.309179.36
5.6.260.3780.230179.54
5.6.250.4220.340179.55
5.6.240.4880.336179.67
5.6.230.3980.330179.58
5.6.220.4020.237179.43
5.6.210.3230.278179.41
5.6.200.3520.260179.39
5.6.190.3620.263179.58
5.6.180.3790.288179.34
5.6.170.4070.288179.52
5.6.160.3180.292179.70
5.6.150.4420.343179.38
5.6.140.3640.240179.47
5.6.130.3840.287179.61
5.6.120.3600.286179.46
5.6.110.4290.270179.45
5.6.100.4900.369179.35
5.6.90.4700.355179.49
5.6.80.4380.301179.33
5.6.70.4170.265179.39
5.6.60.3970.241179.32
5.6.50.4380.292179.54
5.6.40.4570.374179.23
5.6.30.4860.336179.28
5.6.20.4620.337179.52
5.6.10.4710.286179.46
5.6.00.5270.285179.34
5.5.380.3980.208179.69
5.5.370.4160.244179.40
5.5.360.3420.272179.53
5.5.350.3460.273179.46
5.5.340.3410.296179.67
5.5.330.3760.287179.48
5.5.320.4020.284179.39
5.5.310.3840.241179.27
5.5.300.3540.331179.57
5.5.290.3470.271179.37
5.5.280.4400.292179.54
5.5.270.3660.318179.71
5.5.260.3900.284179.53
5.5.250.4430.340179.22
5.5.240.4620.340179.59
5.5.230.3810.279179.54
5.5.220.4050.294179.40
5.5.210.4280.255179.38
5.5.200.4520.343179.53
5.5.190.3980.241179.54
5.5.180.4980.345179.19
5.5.170.4990.285179.23
5.5.160.3770.308179.43
5.5.150.3081.666171.27
5.5.140.3961.949179.52
5.5.130.2801.830171.13
5.5.120.3992.068179.17
5.4.450.3620.301176.33
5.4.440.3660.238176.07
5.4.430.3470.263176.36
5.4.420.4930.326176.21
5.4.410.4650.299176.31
5.4.400.4240.266176.20
5.4.390.3930.281176.15
5.4.380.4140.247176.08
5.4.370.4770.377176.07
5.4.360.4310.370175.85
5.4.350.4000.290176.05
5.4.340.4400.272176.16
5.4.330.4240.258175.96
5.4.320.3600.284176.11
5.4.310.3101.927167.58
5.4.300.2651.856167.81
5.4.290.3991.996176.13
5.4.280.3702.101175.99
5.3.290.3011.703168.10

preferences:
43.89 ms | 400 KiB | 5 Q