3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { const MYCONSTANT = 'constant value'; public static function showConstant( $d='d') { echo $d . "\n"; } } MyClass::showConstant(); echo 'Current PHP version: ' . phpversion();

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.2.00.0030.00719.22
7.1.100.0060.00318.18
7.1.70.0060.00317.11
7.1.60.0000.01119.59
7.1.50.0040.01816.73
7.1.00.0000.07722.36
7.0.200.0040.00416.82
7.0.60.0200.06319.82
7.0.50.0070.07017.97
7.0.40.0000.04720.09
7.0.30.0330.06020.34
7.0.20.0230.07320.10
7.0.10.0130.06720.02
7.0.00.0000.05020.15
5.6.280.0070.07021.13
5.6.210.0070.06320.77
5.6.200.0070.05018.23
5.6.190.0130.08320.62
5.6.180.0530.06020.48
5.6.170.0430.04320.54
5.6.160.0130.04320.39
5.6.150.0070.08018.17
5.6.140.0070.05018.15
5.6.130.0070.04018.16
5.6.120.0100.08021.00
5.6.110.0130.08320.98
5.6.100.0000.04721.08
5.6.90.0030.08021.14
5.6.80.0030.03720.54
5.5.350.4370.04020.41
5.5.340.0100.07017.97
5.5.330.0030.08320.13
5.5.320.0070.08020.36
5.5.310.0200.05020.26
5.5.300.0030.08718.08
5.5.290.0030.08718.01
5.5.280.0100.04720.87
5.5.270.0200.07320.71
5.5.260.0030.06020.79
5.5.250.0130.07320.62
5.5.240.0300.06320.07
5.4.450.0570.05019.63
5.4.440.0770.04719.48
5.4.430.1470.00019.64
5.4.420.1400.00019.28
5.4.410.1370.00019.42
5.4.400.1470.00019.13
5.4.390.1300.00019.19
5.4.380.1370.00019.07
5.4.370.1200.00019.32
5.4.360.0730.00019.19
5.4.350.0900.00019.22
5.4.340.1400.00019.16
5.4.320.1300.00018.99
5.4.310.1470.00019.34
5.4.300.0870.00019.11
5.4.290.0600.00019.21
5.4.280.0700.00019.07
5.4.270.1230.00019.10
5.4.260.1000.00019.11
5.4.250.0700.00019.10
5.4.240.1030.00019.22
5.4.230.1230.00019.10
5.4.220.1370.00019.10
5.4.210.1370.00018.99
5.4.200.1170.00016.71
5.4.190.1400.00019.26
5.4.180.1300.00019.20
5.4.170.1200.00018.98
5.4.160.1530.00019.01
5.4.150.1370.00019.14
5.4.140.1330.00016.29
5.4.130.1270.00016.41
5.4.120.1530.00016.30
5.4.110.1230.00016.25
5.4.100.1400.00016.63
5.4.90.1430.00016.33
5.4.80.1430.00016.56
5.4.70.1370.00016.55
5.4.60.1330.00016.38
5.4.50.1270.00016.44
5.4.40.1130.00016.29
5.4.30.1270.00016.51
5.4.20.1300.00016.25
5.4.10.1570.00016.31
5.4.00.1670.00015.78
5.3.290.1630.00014.62
5.3.280.1570.00014.75
5.3.270.1470.00014.46
5.3.260.1670.00014.59
5.3.250.1370.00014.60
5.3.240.1170.00014.58
5.3.230.1370.00014.48
5.3.220.1470.00014.48
5.3.210.1370.00014.48
5.3.200.1330.00014.41
5.3.190.1570.00014.62
5.3.180.1630.00014.48
5.3.170.1570.00014.72
5.3.160.1470.00014.58
5.3.150.1470.00014.68
5.3.140.1530.00014.41
5.3.130.1470.00014.54
5.3.120.1470.00014.44
5.3.110.1970.00014.46
5.3.100.1300.00014.20
5.3.90.1670.00013.99
5.3.80.1670.00013.98
5.3.70.1170.00014.03
5.3.60.1370.00014.12
5.3.50.1600.00013.84
5.3.40.1870.00013.86
5.3.30.1730.00013.89
5.3.20.1670.00013.80
5.3.10.1700.00013.58
5.3.00.1670.00013.50
5.2.170.1430.00011.15
5.2.160.1470.00011.31
5.2.150.1330.00011.21
5.2.140.1100.00011.04
5.2.130.1330.00011.02
5.2.120.1130.00010.96
5.2.110.1130.00011.17
5.2.100.1130.00011.09
5.2.90.1130.00011.09
5.2.80.1270.00010.94
5.2.70.1130.00011.10
5.2.60.1270.00011.03
5.2.50.1400.00011.18
5.2.40.1170.00011.00
5.2.30.1130.00010.97
5.2.20.1370.00010.87
5.2.10.1030.00010.71
5.2.00.1170.00010.78
5.1.60.0930.00010.13
5.1.50.1000.00010.15
5.1.40.0730.0009.97
5.1.30.0730.00010.25
5.1.20.0970.00010.41
5.1.10.0730.0009.98
5.1.00.0970.00010.05
5.0.50.0600.0008.60
5.0.40.0470.0008.33
5.0.30.0670.0008.28
5.0.20.0570.0008.08
5.0.10.0530.0008.09
5.0.00.0630.0008.09
4.4.90.0430.0005.85
4.4.80.0600.0005.76
4.4.70.0530.0005.84
4.4.60.0500.0005.73
4.4.50.0470.0005.86
4.4.40.0600.0005.93
4.4.30.0500.0005.75
4.4.20.0630.0005.91
4.4.10.0670.0005.91
4.4.00.0730.0005.87
4.3.110.0530.0005.77
4.3.100.0400.0005.66
4.3.90.0430.0005.64
4.3.80.0670.0005.67
4.3.70.0400.0005.80
4.3.60.0370.0005.64
4.3.50.0530.0005.68
4.3.40.0700.0005.72
4.3.30.0370.0004.42
4.3.20.0270.0004.39
4.3.10.0430.0004.37
4.3.00.0100.0277.33

preferences:
29.83 ms | 400 KiB | 5 Q