3v4l.org

run code in 300+ PHP versions simultaneously
<?php function onRequestStart() { $dat = getrusage(); define('PHP_TUSAGE', microtime(true)); define('PHP_RUSAGE', $dat["ru_utime.tv_sec"]*1e6+$dat["ru_utime.tv_usec"]); } function getCpuUsage() { $dat = getrusage(); $dat["ru_utime.tv_usec"] = ($dat["ru_utime.tv_sec"]*1e6 + $dat["ru_utime.tv_usec"]) - PHP_RUSAGE; $time = (microtime(true) - PHP_TUSAGE) * 1000000; // cpu per request if($time > 0) { $cpu = sprintf("%01.2f", ($dat["ru_utime.tv_usec"] / $time) * 100); } else { $cpu = '0.00'; } return $cpu; } onRequestStart(); for($i = 0; $i < 9999999; $i++){} echo getCpuUsage();

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)
7.3.10.0000.11316.77
7.3.00.0050.08016.50
7.2.130.0070.08117.03
7.2.120.0090.08216.87
7.2.110.0080.09816.90
7.2.100.0070.08116.94
7.2.90.0070.08616.89
7.2.80.0070.09316.82
7.2.70.0050.10216.94
7.2.60.0060.08616.79
7.2.50.0020.10616.69
7.2.40.0020.10716.76
7.2.30.0090.09516.97
7.2.20.0070.10316.92
7.2.10.0030.09916.74
7.2.00.0070.08717.76
7.1.250.0090.27115.87
7.1.240.0120.26815.84
7.1.230.0030.26015.50
7.1.220.0050.28015.82
7.1.210.0130.24615.49
7.1.200.0020.25815.75
7.1.190.0070.28315.71
7.1.180.0060.30315.55
7.1.170.0030.29915.71
7.1.160.0080.28915.64
7.1.150.0030.29015.94
7.1.140.0020.28715.71
7.1.130.0100.27615.89
7.1.120.0050.27115.75
7.1.110.0040.25715.64
7.1.100.0030.27315.56
7.1.90.0060.25715.84
7.1.80.0000.27215.63
7.1.70.0070.20416.49
7.1.60.0080.19617.37
7.1.50.0110.19816.34
7.1.40.0090.26215.68
7.1.30.0020.26915.91
7.1.20.0030.26015.79
7.1.10.0060.29415.73
7.1.00.0070.24719.10
7.0.330.0040.24714.93
7.0.320.0130.28415.39
7.0.310.0120.26615.26
7.0.300.0130.28814.99
7.0.290.0070.29315.47
7.0.280.0100.28315.19
7.0.270.0030.31115.06
7.0.260.0070.29815.30
7.0.250.0080.26515.16
7.0.240.0100.27915.40
7.0.230.0120.25715.03
7.0.220.0130.26015.36
7.0.210.0000.27615.45
7.0.200.0040.17716.13
7.0.190.0030.25915.32
7.0.180.0030.28015.33
7.0.170.0140.27215.58
7.0.160.0090.25815.48
7.0.150.0000.26515.31
7.0.140.0030.22618.79
7.0.130.0070.25015.47
7.0.120.0000.26715.38
7.0.110.0050.27115.33
7.0.100.0000.25614.89
7.0.90.0130.24415.25
7.0.80.0080.26915.35
7.0.70.0040.26615.48
7.0.60.0120.21317.74
7.0.50.0100.22016.67
7.0.40.0020.21616.82
7.0.30.0210.20816.77
7.0.20.0160.20016.78
7.0.10.0070.17916.74
7.0.00.0070.19616.83
5.6.380.0040.70514.51
5.6.370.0080.75514.75
5.6.360.0030.68414.53
5.6.350.0100.74314.65
5.6.340.0070.73514.71
5.6.330.0040.70714.46
5.6.320.0080.66514.52
5.6.310.0030.64714.34
5.6.300.0000.74914.37
5.6.290.0030.70414.70
5.6.280.0020.59717.71
5.6.270.0060.69514.19
5.6.260.0030.67814.06
5.6.250.0060.68614.57
5.6.240.0020.70214.41
5.6.230.0070.68314.46
5.6.220.0040.68814.14
5.6.210.0130.49217.50
5.6.200.0050.49716.35
5.6.190.0120.50317.49
5.6.180.0230.45317.37
5.6.170.0310.48117.41
5.6.160.0070.45517.44
5.6.150.0080.55216.33
5.6.140.0050.44616.33
5.6.130.0070.49616.25
5.6.120.0030.47717.61
5.6.110.0070.47917.72
5.6.100.0270.43517.84
5.6.90.0050.44917.61
5.6.80.0070.47217.28
5.6.70.0100.68714.15
5.6.60.0000.71914.32
5.6.50.0100.77814.18
5.6.40.0070.68614.22
5.6.30.0070.70514.28
5.6.20.0000.70714.35
5.6.10.0030.66414.38
5.6.00.0030.64114.68
5.5.380.0030.68811.04
5.5.370.0050.69111.21
5.5.360.0000.63611.07
5.5.350.0140.48915.69
5.5.340.0050.46214.50
5.5.330.0080.49215.66
5.5.320.0110.47615.75
5.5.310.0130.48515.70
5.5.300.0030.46714.49
5.5.290.0090.51914.74
5.5.280.0070.43416.02
5.5.270.0120.47916.03
5.5.260.0070.50115.97
5.5.250.0120.48915.94
5.5.240.0070.55115.70
5.5.230.0000.79111.05
5.5.220.0000.71811.14
5.5.210.0030.66611.37
5.5.200.0030.72411.30
5.5.190.0030.65511.34
5.5.180.0050.64811.34
5.5.170.0030.61910.85
5.5.160.0070.64311.16
5.5.150.0120.67811.36
5.5.140.0150.68711.48
5.5.130.0140.64511.21
5.5.120.0060.67611.39
5.5.110.0050.76311.33
5.5.100.0050.66211.30
5.5.90.0010.71611.18
5.5.80.0030.73011.29
5.5.70.0030.69511.36
5.5.60.0070.65610.91
5.5.50.0030.67611.17
5.5.40.0050.65311.00
5.5.30.0000.69611.42
5.5.20.0030.67411.21
5.5.10.0070.69611.21
5.5.00.0040.65911.06
5.4.450.0170.50215.17
5.4.440.0200.50415.36
5.4.430.0230.47415.29
5.4.420.0200.48315.33
5.4.410.0280.50415.35
5.4.400.0150.50315.19
5.4.390.0420.50315.24
5.4.380.0230.57114.68
5.4.370.0240.53614.92
5.4.360.0120.54714.96
5.4.350.0220.53214.87
5.4.340.0180.56514.71
5.4.330.0030.71711.18
5.4.320.0060.47011.86
5.4.310.0060.47011.90
5.4.300.0090.49511.83
5.4.290.0070.49111.70
5.4.280.0060.51011.57
5.4.270.0090.49611.66
5.4.260.0070.61511.80
5.4.250.0040.49111.82
5.4.240.0040.47411.68
5.4.230.0040.48311.60
5.4.220.0060.46811.73
5.4.210.0070.46111.73
5.4.200.0080.49411.67
5.4.190.0060.45711.82
5.4.180.0070.48011.75
5.4.170.0060.48811.79
5.4.160.0040.50811.91
5.4.150.0030.51111.78
5.4.140.0060.52011.71
5.4.130.0050.51011.72
5.4.120.0020.50911.66
5.4.110.0070.49311.57
5.4.100.0050.48211.51
5.4.90.0060.50211.58
5.4.80.0070.50011.55
5.4.70.0050.48811.41
5.4.60.0090.49211.54
5.4.50.0040.46411.63
5.4.40.0080.48811.69
5.4.30.0060.50511.49
5.4.20.0070.48511.59
5.4.10.0040.48611.53
5.4.00.0060.48111.18
5.3.290.0080.50811.80
5.3.280.0080.51611.64
5.3.270.0020.57811.71
5.3.260.0070.54011.67
5.3.250.0070.54211.67
5.3.240.0040.53311.61
5.3.230.0050.52811.61
5.3.220.0050.55311.63
5.3.210.0040.53511.62
5.3.200.0040.55211.64
5.3.190.0070.52911.60
5.3.180.0040.53311.72
5.3.170.0050.53511.73
5.3.160.0040.59311.59
5.3.150.0020.55311.59
5.3.140.0050.52511.61
5.3.130.0060.53111.66
5.3.120.0040.57011.58
5.3.110.0070.54511.67
5.3.100.0040.52811.41
5.3.90.0100.57911.36
5.3.80.0040.54711.30
5.3.70.0030.55511.31
5.3.60.0030.55911.30
5.3.50.0050.60411.32
5.3.40.0050.55411.27
5.3.30.0070.54311.35
5.3.20.0030.57411.14
5.3.10.0070.52411.13
5.3.00.0040.55011.12
5.2.170.0030.6539.87
5.2.160.0100.6469.87
5.2.150.0040.6159.87
5.2.140.0020.6329.87
5.2.130.0030.6429.85
5.2.120.0070.6329.85
5.2.110.0040.6439.85
5.2.100.0040.6669.85
5.2.90.0030.6209.85
5.2.80.0050.6589.85
5.2.70.0060.6349.85
5.2.60.0030.6189.82
5.2.50.0050.6619.81
5.2.40.0040.6989.80
5.2.30.0060.6579.79
5.2.20.0040.6379.78
5.2.10.0040.5899.73
5.2.00.0050.6469.67
5.1.60.0060.7369.31
5.1.50.0020.6499.30
5.1.40.0040.6869.29
5.1.30.0020.6879.47
5.1.20.0060.7349.48
5.1.10.0060.6619.34
5.1.00.0020.6599.34
5.0.50.0081.5798.58
5.0.40.0041.6098.51
5.0.30.0081.4858.42
5.0.20.0041.4168.41
5.0.10.0031.4418.40
5.0.00.0041.4668.40
4.4.90.0051.4497.64
4.4.80.0031.5247.63
4.4.70.0041.4707.63
4.4.60.0041.4747.63
4.4.50.0041.5327.64
4.4.40.0041.5027.61
4.4.30.0041.5047.64
4.4.20.0011.4677.68
4.4.10.0021.5247.68
4.4.00.0041.5297.63
4.3.110.0051.5497.59
4.3.100.0031.4447.59
4.3.90.0011.4437.57
4.3.80.0041.4707.55
4.3.70.0021.4517.57
4.3.60.0051.4627.57
4.3.50.0021.4177.57
4.3.40.0021.4037.52
4.3.30.0011.4086.93
4.3.20.0031.4376.92
4.3.10.0021.3896.90
4.3.00.0021.47914.98

preferences:
36.59 ms | 401 KiB | 5 Q