3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Defining __construct and filter makes filter a normal method class Filter { // PHP 4/5: E_STRICT "Redefining already defined constructor" // PHP 7: No error is raised // PHP 8: No error is raised function filter($a) { echo "In Filter::filter method\n"; } // This raises the E_STRICT in PHP 4/5 function __construct() { echo "In Filter constructor\n"; } } $f = new Filter(); $f->filter(3);

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.0070.01118.20
8.3.50.0130.00421.16
8.3.40.0100.01018.79
8.3.30.0120.00618.54
8.3.20.0040.00420.29
8.3.10.0030.00521.90
8.3.00.0040.00417.91
8.2.180.0120.00318.16
8.2.170.0120.00922.96
8.2.160.0130.00320.55
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00417.75
8.2.110.0060.01022.11
8.2.100.0090.00317.75
8.2.90.0000.00719.28
8.2.80.0000.00917.97
8.2.70.0030.00617.63
8.2.60.0060.00317.80
8.2.50.0000.00918.07
8.2.40.0040.00719.20
8.2.30.0030.00320.58
8.2.20.0080.00017.59
8.2.10.0040.00417.87
8.2.00.0030.00517.96
8.1.280.0090.00925.92
8.1.270.0150.00621.88
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.92
8.1.230.0080.00417.42
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.22
8.1.190.0050.00317.10
8.1.180.0040.00418.10
8.1.170.0040.00418.64
8.1.160.0040.00421.90
8.1.150.0030.00518.68
8.1.140.0000.00917.34
8.1.130.0000.00717.64
8.1.120.0040.00317.28
8.1.110.0020.00517.29
8.1.100.0040.00417.28
8.1.90.0000.00817.33
8.1.80.0040.00417.32
8.1.70.0030.00317.35
8.1.60.0040.00417.56
8.1.50.0000.00817.49
8.1.40.0040.00417.52
8.1.30.0060.00317.55
8.1.20.0000.00817.61
8.1.10.0040.00417.46
8.1.00.0030.00617.41
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00818.43
8.0.270.0070.00017.14
8.0.260.0000.00817.30
8.0.250.0040.00416.84
8.0.240.0000.00716.93
8.0.230.0000.00716.78
8.0.220.0060.00316.72
8.0.210.0070.00016.80
8.0.200.0000.00616.88
8.0.190.0060.00316.74
8.0.180.0040.00416.89
8.0.170.0030.00616.69
8.0.160.0020.00516.81
8.0.150.0000.00716.77
8.0.140.0040.00416.81
8.0.130.0030.00313.13
8.0.120.0040.00416.74
8.0.110.0000.00716.76
8.0.100.0070.00016.70
8.0.90.0030.00316.70
8.0.80.0140.00016.77
8.0.70.0040.00416.71
8.0.60.0000.00716.67
8.0.50.0080.00016.84
8.0.30.0100.00916.88
8.0.20.0080.01117.40
8.0.10.0030.00516.82
8.0.00.0090.01116.72
7.4.330.0000.00615.08
7.4.320.0060.00016.48
7.4.300.0030.00316.54
7.4.290.0000.00716.50
7.4.280.0000.01016.48
7.4.270.0030.00316.64
7.4.260.0050.00216.47
7.4.250.0040.00416.39
7.4.240.0020.00516.47
7.4.230.0040.00316.48
7.4.220.0100.00716.63
7.4.210.0090.00616.48
7.4.200.0070.00016.63
7.4.160.0160.00316.57
7.4.150.0130.00717.40
7.4.140.0100.01017.86
7.4.130.0060.01116.44
7.4.120.0090.01016.51
7.4.110.0120.01216.47
7.4.100.0100.00716.58
7.4.90.0130.00716.63
7.4.80.0100.00719.39
7.4.70.0040.01216.57
7.4.60.0100.00716.48
7.4.50.0000.00816.45
7.4.40.0070.01016.68
7.4.30.0180.00016.60
7.4.00.0080.00815.14
7.3.330.0000.00513.17
7.3.320.0060.00013.31
7.3.310.0030.00416.20
7.3.300.0040.00416.10
7.3.290.0090.00816.21
7.3.280.0070.01216.21
7.3.270.0120.00917.40
7.3.260.0030.01316.28
7.3.250.0100.01016.22
7.3.240.0060.00916.29
7.3.230.0110.00616.45
7.3.210.0090.00916.20
7.3.200.0060.00916.55
7.3.190.0100.00716.20
7.3.180.0090.01216.29
7.3.170.0060.01216.27
7.3.160.0100.00716.42
7.3.10.0060.01016.54
7.3.00.0030.00616.47
7.2.330.0140.00316.53
7.2.320.0130.01016.50
7.2.310.0130.00316.61
7.2.300.0090.00916.27
7.2.290.0080.00816.65
7.2.130.0030.01016.87
7.2.120.0120.00616.63
7.2.110.0070.00716.82
7.2.100.0070.00716.84
7.2.90.0040.00816.64
7.2.80.0110.00716.79
7.2.70.0120.00816.57
7.2.60.0050.00916.90
7.2.50.0040.01116.93
7.2.40.0040.01516.91
7.2.30.0090.00616.86
7.2.20.0040.01116.55
7.2.10.0030.01016.87
7.2.00.0060.00318.18
7.1.250.0100.00315.52
7.1.200.0030.01015.81
7.1.100.0060.00617.96
7.1.70.0000.01017.14
7.1.60.0060.01519.20
7.1.50.0110.01416.95
7.1.00.0070.07322.40
7.0.200.0000.00816.61
7.0.60.0130.07320.01
7.0.50.0070.04017.73
7.0.40.0030.04320.41
7.0.30.0300.06720.23
7.0.20.0270.05020.10
7.0.10.0030.04320.09
7.0.00.0030.05020.24
5.6.280.0070.07021.07
5.6.210.0030.07720.77
5.6.200.0130.06718.27
5.6.190.0030.06720.55
5.6.180.0570.07020.69
5.6.170.0270.06020.48
5.6.160.0070.08020.54
5.6.150.0100.08018.18
5.6.140.0070.05318.21
5.6.130.0170.07018.22
5.6.120.0030.08021.02
5.6.110.0070.08320.97
5.6.100.0070.08020.98
5.6.90.0070.08320.98
5.6.80.0100.05320.38
5.5.350.0230.06720.44
5.5.340.0030.04018.05
5.5.330.0070.04720.27
5.5.320.0470.04720.35
5.5.310.0230.05320.36
5.5.300.0070.08717.98
5.5.290.0070.03717.96
5.5.280.0130.08320.80
5.5.270.0170.05720.95
5.5.260.0130.07720.73
5.5.250.0030.10320.78
5.5.240.0100.05720.07
5.4.450.3230.03719.39
5.4.440.0000.06019.59
5.4.430.3130.04019.41
5.4.420.3070.04319.31
5.4.410.2970.03019.28
5.4.400.3400.03319.30
5.4.390.3100.03718.99
5.4.380.3230.03018.88
5.4.370.3830.04019.16
5.4.360.3600.03318.85
5.4.350.3300.03319.07
5.4.340.4100.03719.11
5.4.320.3900.03319.10
5.4.310.3770.04319.20
5.4.300.3570.03318.98
5.4.290.3700.03019.20
5.4.280.3200.04019.31
5.4.270.3370.04019.09
5.4.260.3470.04018.94
5.4.250.3500.03718.86
5.4.240.3630.04019.14
5.4.230.4070.03718.99
5.4.220.4070.03719.06
5.4.210.3630.04019.05
5.4.200.4130.03719.08
5.4.190.3970.03719.15
5.4.180.4100.03019.23
5.4.170.4070.03019.21
5.4.160.4070.04019.06
5.4.150.4030.03719.18
5.4.140.4130.04316.43
5.4.130.3430.04016.35
5.4.120.3430.03016.43
5.4.110.3130.04016.61
5.4.100.3400.03716.61
5.4.90.3470.03316.59
5.4.80.3000.03016.60

preferences:
41.14 ms | 401 KiB | 5 Q