3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Too { static function bar() { $a = function () { var_dump(__CLASS__); }; $a(); $a = function () { var_dump(get_class()); }; $a(); if (isset($this)) { $a = function () { var_dump(get_class($this)); }; $a(); } } } class Foo { use Too; } $f = new Foo; echo "Between\n"; $f->bar(); echo "Between\n"; $f::bar(); echo "Between\n"; Foo::bar();

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.0090.00916.63
8.3.50.0120.00522.85
8.3.40.0090.00618.78
8.3.30.0140.00319.08
8.3.20.0040.00420.31
8.3.10.0050.00323.66
8.3.00.0040.00419.51
8.2.180.0070.00718.31
8.2.170.0070.00722.96
8.2.160.0100.00320.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00526.16
8.2.120.0070.00021.00
8.2.110.0100.00722.26
8.2.100.0000.01217.72
8.2.90.0040.00719.11
8.2.80.0080.00017.97
8.2.70.0000.00917.50
8.2.60.0050.00317.80
8.2.50.0000.00818.07
8.2.40.0000.00918.22
8.2.30.0000.00818.02
8.2.20.0050.00317.70
8.2.10.0040.00417.98
8.2.00.0040.00417.71
8.1.280.0060.00925.92
8.1.270.0050.00323.91
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0100.00023.86
8.1.230.0000.01122.66
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00717.23
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0000.00918.63
8.1.160.0000.00721.92
8.1.150.0000.00718.95
8.1.140.0050.00317.44
8.1.130.0030.00517.88
8.1.120.0000.00717.50
8.1.110.0050.00317.48
8.1.100.0040.00417.46
8.1.90.0000.00817.51
8.1.80.0000.00717.38
8.1.70.0030.00317.46
8.1.60.0030.00517.48
8.1.50.0050.00317.55
8.1.40.0050.00317.39
8.1.30.0030.00517.49
8.1.20.0000.00717.73
8.1.10.0060.00317.45
8.1.00.0030.00617.40
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0000.00818.36
8.0.270.0000.00717.13
8.0.260.0050.00217.18
8.0.250.0000.00717.00
8.0.240.0000.00716.95
8.0.230.0070.00016.94
8.0.220.0000.00716.93
8.0.210.0000.00816.93
8.0.200.0030.00316.97
8.0.190.0040.00316.84
8.0.180.0000.00816.94
8.0.170.0000.00816.80
8.0.160.0030.00316.94
8.0.150.0000.00816.87
8.0.140.0030.00616.91
8.0.130.0060.00013.37
8.0.120.0080.00016.82
8.0.110.0000.00816.77
8.0.100.0000.00816.89
8.0.90.0080.00016.99
8.0.80.0130.00316.84
8.0.70.0080.00016.93
8.0.60.0000.00816.73
8.0.50.0080.00016.92
8.0.30.0080.01016.91
8.0.20.0090.01117.40
8.0.10.0040.00416.84
8.0.00.0020.01716.67
7.4.330.0050.00015.03
7.4.320.0000.00616.41
7.4.300.0030.00616.52
7.4.290.0000.00716.63
7.4.280.0040.00416.35
7.4.270.0030.00316.52
7.4.260.0000.00716.62
7.4.250.0000.00816.42
7.4.240.0020.00516.58
7.4.230.0030.00316.68
7.4.220.0100.00716.57
7.4.210.0120.00916.53
7.4.200.0000.00816.58
7.4.160.0110.01116.57
7.4.150.0090.00917.40
7.4.140.0130.00517.86
7.4.130.0070.01116.51
7.4.120.0100.00716.41
7.4.110.0090.00916.71
7.4.100.0110.00716.46
7.4.90.0030.01416.41
7.4.80.0040.01619.39
7.4.70.0060.01016.53
7.4.60.0100.00716.61
7.4.50.0030.00316.63
7.4.40.0000.01716.59
7.4.30.0120.00316.34
7.4.00.0060.00614.88
7.3.330.0060.00213.36
7.3.320.0000.00513.16
7.3.310.0030.00316.34
7.3.300.0000.00616.37
7.3.290.0030.01616.36
7.3.280.0070.01116.39
7.3.270.0140.00417.40
7.3.260.0160.00716.56
7.3.250.0080.01116.41
7.3.240.0160.00016.26
7.3.230.0140.00816.39
7.3.210.0100.00716.63
7.3.200.0030.01319.39
7.3.190.0130.00616.32
7.3.180.0090.00916.39
7.3.170.0060.01016.52
7.3.160.0140.00816.51
7.2.330.0060.01316.77
7.2.320.0110.00716.50
7.2.310.0130.01016.71
7.2.300.0120.00816.73
7.2.290.0090.00916.36
7.2.60.0000.01516.98
7.2.50.0000.01317.00
7.1.200.0080.00415.47
7.1.70.0120.00417.01
7.1.60.0060.00617.27
7.1.50.0000.01116.67
7.1.00.0100.07022.43
7.0.200.0030.01316.79
7.0.140.0030.07322.00
7.0.60.0030.08321.82
7.0.50.0030.08017.78
7.0.40.0070.04720.26
7.0.30.0270.07320.06
7.0.20.0270.08320.27
7.0.10.0000.04720.10
7.0.00.0030.06720.06
5.6.280.0000.07721.09
5.6.210.0100.05020.71
5.6.200.0030.05318.24
5.6.190.0200.05720.52
5.6.180.0430.05720.46
5.6.170.0430.06320.47
5.6.160.0130.07720.45
5.6.150.0070.08018.15
5.6.140.0100.07018.17
5.6.130.0100.07718.21
5.6.120.0200.07021.16
5.6.110.0130.08021.00
5.6.100.0100.08021.00
5.6.90.0230.06321.01
5.6.80.0070.08020.54
5.5.350.4170.04720.30
5.5.340.0100.08017.99
5.5.330.0130.07720.44
5.5.320.0370.05720.52
5.5.310.0270.08020.27
5.5.300.0100.06017.94
5.5.290.0070.08318.04
5.5.280.0070.08720.88
5.5.270.0000.05020.94
5.5.260.0070.08320.89
5.5.250.0100.06320.63
5.5.240.0030.03720.18
5.4.450.3600.03719.30
5.4.440.0000.06019.39
5.4.430.1600.05319.31
5.4.420.4300.03719.57
5.4.410.3570.03719.26
5.4.400.3900.03719.19
5.4.390.3470.04019.04
5.4.380.3730.02718.99
5.4.370.3730.03719.00
5.4.360.3600.03319.13
5.4.350.3800.04019.18
5.4.340.3570.03719.00
5.4.320.3570.03319.23
5.4.310.4100.04319.21
5.4.300.3630.03319.19
5.4.290.3870.03319.17
5.4.280.3500.03718.99
5.4.270.3230.04319.14
5.4.260.3830.03018.99
5.4.250.3730.03719.17
5.4.240.3930.03018.94
5.4.230.3730.03719.21
5.4.220.3830.03718.96
5.4.210.3700.04019.05
5.4.200.3800.04019.22
5.4.190.3570.03719.18
5.4.180.3870.03319.16
5.4.170.3900.03719.04
5.4.160.3800.04019.08
5.4.150.3900.03719.15
5.4.140.2930.03716.54
5.4.130.3130.04016.35
5.4.120.3100.03316.43
5.4.110.3700.02716.53
5.4.100.3400.03316.39
5.4.90.3530.03716.44
5.4.80.4270.03716.55
5.4.70.4200.04716.41
5.4.60.3030.03016.23
5.4.50.3670.02716.50
5.4.40.4870.03016.41
5.4.30.3500.03316.30
5.4.20.3600.03316.52
5.4.10.3200.04016.42
5.4.00.3970.03015.94
5.3.290.3830.03314.57
5.3.280.3830.03714.69
5.3.270.3830.04014.57
5.3.260.3500.04014.44
5.3.250.3730.03314.54
5.3.240.3830.04014.40
5.3.230.3200.03014.69
5.3.220.2970.03314.55
5.3.210.3270.04314.58
5.3.200.3630.03314.38
5.3.190.3030.03714.65
5.3.180.3070.03014.50
5.3.170.3370.03714.50
5.3.160.4100.04014.49
5.3.150.3870.03314.50
5.3.140.3700.03714.49
5.3.130.4370.04314.45
5.3.120.4570.04014.48
5.3.110.3930.04314.34
5.3.100.4830.03313.96
5.3.90.3430.03013.90
5.3.80.3870.03013.94
5.3.70.3600.03313.95
5.3.60.3570.03313.94
5.3.50.3730.03313.87
5.3.40.3870.03313.78
5.3.30.0770.04013.72
5.3.20.0070.06713.63
5.3.10.3800.03013.60
5.3.00.3830.04313.57
5.2.170.3030.02311.00
5.2.160.2570.03311.15
5.2.150.3370.03011.11
5.2.140.0100.05711.12
5.2.130.0100.05311.03
5.2.120.2970.03310.98
5.2.110.3200.03010.99
5.2.100.3300.02711.09
5.2.90.2970.03011.18
5.2.80.3270.02711.07
5.2.70.3230.02710.95
5.2.60.3300.02311.19
5.2.50.3100.03011.09
5.2.40.2530.03010.98
5.2.30.2570.03310.86
5.2.20.2400.02311.03
5.2.10.2630.02310.90
5.2.00.2670.02010.79
5.1.60.1830.0279.89
5.1.50.2670.0239.96
5.1.40.2800.0239.83
5.1.30.2900.01710.32
5.1.20.3100.02710.35
5.1.10.0100.05010.08
5.1.00.0000.05010.13
5.0.50.0000.0438.45
5.0.40.0070.0438.39
5.0.30.0030.0408.12
5.0.20.1800.0208.16
5.0.10.1400.0278.20
5.0.00.1770.0338.12
4.4.90.1400.0175.86
4.4.80.1170.0175.86
4.4.70.1500.0175.86
4.4.60.1200.0175.86
4.4.50.1270.0175.86
4.4.40.1530.0275.86
4.4.30.1330.0135.86
4.4.20.1100.0175.90
4.4.10.0070.0205.89
4.4.00.0000.0505.86
4.3.110.0030.0275.86
4.3.100.1430.0175.86
4.3.90.1670.0175.86
4.3.80.1700.0275.86
4.3.70.1700.0135.86
4.3.60.1570.0175.86
4.3.50.1430.0175.86
4.3.40.1400.0505.86
4.3.30.0770.0235.86
4.3.20.0730.0235.86
4.3.10.0630.0175.86
4.3.00.0630.0205.86

preferences:
41.42 ms | 401 KiB | 5 Q