3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fn = function () { return get_called_class(); }; var_dump((new ReflectionFunction($fn))->getClosureScopeClass()); class C { private static $test = 'In class C'; public static function s_fn() { $fn1 = function () { var_dump(D::$test); }; $fn2 = function () { var_dump(static::$test); }; return array($fn1, $fn2); } } class D extends C { private static $test = 'In class D'; } foreach (D::s_fn() as $f) $f();

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.70.0110.00416.63
8.3.60.0130.00716.50
8.3.50.0090.01322.92
8.3.40.0110.00718.83
8.3.30.0110.00419.27
8.3.20.0000.00720.34
8.3.10.0050.00323.65
8.3.00.0000.00819.25
8.2.180.0120.00316.88
8.2.170.0120.00322.96
8.2.160.0130.00020.53
8.2.150.0040.00424.18
8.2.140.0000.01524.66
8.2.130.0140.00026.16
8.2.120.0080.00020.91
8.2.110.0030.00621.00
8.2.100.0080.00418.03
8.2.90.0050.00519.17
8.2.80.0040.00417.97
8.2.70.0000.00917.63
8.2.60.0070.00018.05
8.2.50.0040.00418.07
8.2.40.0040.00420.07
8.2.30.0040.00417.95
8.2.20.0040.00417.86
8.2.10.0000.00718.07
8.2.00.0080.00017.71
8.1.280.0150.00025.92
8.1.270.0000.01223.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0070.00323.77
8.1.230.0060.00620.96
8.1.220.0000.00917.74
8.1.210.0080.00018.77
8.1.200.0040.00417.47
8.1.190.0090.00017.23
8.1.180.0030.00618.10
8.1.170.0050.00318.52
8.1.160.0000.00722.07
8.1.150.0070.00018.78
8.1.140.0070.00017.46
8.1.130.0030.00317.75
8.1.120.0030.00417.37
8.1.110.0040.00417.42
8.1.100.0000.00717.36
8.1.90.0040.00417.37
8.1.80.0080.00017.38
8.1.70.0030.00317.39
8.1.60.0000.00917.55
8.1.50.0040.00417.46
8.1.40.0040.00417.42
8.1.30.0000.00917.61
8.1.20.0000.00817.63
8.1.10.0070.00017.53
8.1.00.0000.00817.41
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.49
8.0.270.0000.00717.16
8.0.260.0040.00417.16
8.0.250.0000.00716.93
8.0.240.0030.00316.98
8.0.230.0040.00416.96
8.0.220.0030.00316.91
8.0.210.0000.00716.96
8.0.200.0030.00317.00
8.0.190.0030.00516.93
8.0.180.0000.00717.02
8.0.170.0030.00516.96
8.0.160.0030.00416.81
8.0.150.0030.00316.92
8.0.140.0040.00416.88
8.0.130.0000.00613.36
8.0.120.0050.00316.92
8.0.110.0000.00716.95
8.0.100.0040.00416.84
8.0.90.0000.00716.97
8.0.80.0120.00316.96
8.0.70.0040.00416.95
8.0.60.0040.00417.00
8.0.50.0050.00316.99
8.0.30.0160.00617.14
8.0.20.0110.01417.40
8.0.10.0040.00417.13
8.0.00.0090.00816.57
7.4.330.0000.00515.00
7.4.320.0040.00416.46
7.4.300.0000.00916.61
7.4.290.0070.00016.50
7.4.280.0040.00416.64
7.4.270.0070.00016.60
7.4.260.0030.00316.48
7.4.250.0050.00316.39
7.4.240.0000.00716.52
7.4.230.0070.00016.58
7.4.220.0120.00616.70
7.4.210.0030.01416.44
7.4.200.0030.00316.63
7.4.160.0130.00716.65
7.4.150.0090.00917.40
7.4.140.0060.01217.86
7.4.130.0100.00716.45
7.4.120.0120.00516.64
7.4.110.0100.00716.62
7.4.100.0070.01116.35
7.4.90.0140.00316.72
7.4.80.0150.00919.39
7.4.70.0080.00816.60
7.4.60.0080.00816.52
7.4.50.0040.00416.62
7.4.40.0150.00716.62
7.4.30.0100.01016.57
7.4.00.0040.00715.15
7.3.330.0000.00513.38
7.3.320.0000.00513.37
7.3.310.0000.00716.42
7.3.300.0030.00316.36
7.3.290.0110.00416.44
7.3.280.0080.01016.35
7.3.270.0110.00617.40
7.3.260.0140.00416.44
7.3.250.0090.00716.39
7.3.240.0030.01416.50
7.3.230.0100.00716.50
7.3.210.0060.00916.50
7.3.200.0060.00919.39
7.3.190.0090.00916.39
7.3.180.0230.02716.46
7.3.170.0130.00316.60
7.3.160.0060.01116.47
7.2.330.0140.00416.66
7.2.320.0130.01016.81
7.2.310.0070.01016.64
7.2.300.0060.01116.66
7.2.290.0070.01316.52
7.2.110.0200.00716.50
7.2.60.0070.00716.96
7.2.00.0070.01019.42
7.1.200.0060.00315.91
7.1.100.0080.00318.05
7.1.70.0030.00616.87
7.1.60.0170.00719.40
7.1.50.0000.01416.63
7.1.00.0000.07722.33
7.0.200.0000.00816.68
7.0.140.0000.07322.05
7.0.60.0070.07319.88
7.0.50.0030.04317.87
7.0.40.0030.07320.18
7.0.30.0170.04320.26
7.0.20.0100.05020.21
7.0.10.0100.06720.23
7.0.00.0070.08720.15
5.6.280.0030.07021.11
5.6.210.0070.06720.71
5.6.200.0070.04718.19
5.6.190.0100.03720.61
5.6.180.3670.04020.39
5.6.170.0430.07320.40
5.6.160.0130.03720.54
5.6.150.0130.07318.19
5.6.140.0070.08318.23
5.6.130.0070.03718.11
5.6.120.0030.05320.77
5.6.110.0100.08721.03
5.6.100.0030.09321.09
5.6.90.0170.06021.06
5.6.80.0170.06720.43
5.5.350.0130.03320.39
5.5.340.0170.06318.07
5.5.330.0070.07020.32
5.5.320.0530.06320.24
5.5.310.0400.03720.30
5.5.300.0000.04317.98
5.5.290.0000.05318.01
5.5.280.0070.04020.81
5.5.270.0100.08320.85
5.5.260.0170.04720.87
5.5.250.0130.07720.71
5.5.240.0230.06720.28
5.4.450.2130.03319.52
5.4.440.2070.04019.57
5.4.430.1800.03719.16
5.4.420.2030.04019.19
5.4.410.2030.04019.28
5.4.400.2070.04019.14
5.4.390.2100.03719.19
5.4.380.2030.04319.31
5.4.370.1830.03019.06
5.4.360.1800.03318.95
5.4.350.2000.04719.21
5.4.340.1400.05019.13
5.4.320.1900.04019.24
5.4.310.1770.03718.84
5.4.300.1770.03719.19
5.4.290.1830.04719.16
5.4.280.1900.04019.13
5.4.270.2030.04319.16
5.4.260.2100.04019.08
5.4.250.2200.03019.20
5.4.240.2130.04019.21
5.4.230.1970.04319.08
5.4.220.1900.04719.07
5.4.210.1870.04719.21
5.4.200.1970.04019.19
5.4.190.1930.04018.82
5.4.180.2070.04018.82
5.4.170.1830.03719.21
5.4.160.1770.03719.17
5.4.150.1770.04319.29
5.4.140.1800.04316.38
5.4.130.2070.04016.56
5.4.120.1830.04716.50
5.4.110.2070.03716.50
5.4.100.2070.04016.50
5.4.90.2070.04016.60
5.4.80.2100.03316.57
5.4.70.1830.03016.43
5.4.60.2000.03316.34
5.4.50.1800.03316.17
5.4.40.2070.03716.38
5.4.30.1730.04016.32
5.4.20.2070.03016.47
5.4.10.2000.04316.37
5.4.00.2000.04315.90
5.3.290.2030.04714.81
5.3.280.2100.04014.60
5.3.270.2000.04314.68
5.3.260.0030.06714.83
5.3.250.0070.07314.61
5.3.240.0030.05714.51
5.3.230.1070.04314.71
5.3.220.2070.04014.79
5.3.210.2170.04014.62
5.3.200.2100.04014.49
5.3.190.2000.04014.64
5.3.180.2030.04714.49
5.3.170.1800.04014.55
5.3.160.2070.03714.53
5.3.150.2030.04014.68
5.3.140.2130.04714.48
5.3.130.1930.03714.47
5.3.120.2030.03714.47
5.3.110.1900.04014.46
5.3.100.2170.03713.95
5.3.90.1930.03014.04
5.3.80.2000.04313.93
5.3.70.1900.04013.91
5.3.60.2200.04013.93
5.3.50.2000.03313.86
5.3.40.2070.04313.89
5.3.30.1970.03713.88
5.3.20.2330.04313.61
5.3.10.2030.03713.55
5.3.00.1900.03313.59
5.2.170.2170.01710.98
5.2.160.1700.03711.04
5.2.150.1800.03711.16
5.2.140.1770.03311.08
5.2.130.1770.02310.95
5.2.120.1770.03011.28
5.2.110.2230.02011.11
5.2.100.1930.03711.15
5.2.90.1800.03710.97
5.2.80.1600.02711.14
5.2.70.1700.04010.94
5.2.60.1700.03311.20
5.2.50.1700.03311.03
5.2.40.0030.05310.84
5.2.30.0000.06310.81
5.2.20.0070.05010.97
5.2.10.0000.06710.80
5.2.00.0000.03310.62
5.1.60.1100.0339.93
5.1.50.1470.03010.07
5.1.40.1200.0279.86
5.1.30.1470.02710.34
5.1.20.1200.02710.37
5.1.10.1500.03310.04
5.1.00.1300.03310.00
5.0.50.0870.0338.60
5.0.40.0630.0178.52
5.0.30.0670.0378.37
5.0.20.0770.0208.37
5.0.10.0630.0238.37
5.0.00.0770.0438.37
4.4.90.0770.0308.37
4.4.80.0670.0138.37
4.4.70.0630.0138.37
4.4.60.0630.0138.37
4.4.50.0700.0108.37
4.4.40.0630.0238.37
4.4.30.0870.0208.37
4.4.20.0770.0308.37
4.4.10.0630.0178.37
4.4.00.0600.0238.37
4.3.110.0570.0178.37
4.3.100.0800.0238.37
4.3.90.0670.0178.37
4.3.80.0570.0278.37
4.3.70.0600.0138.37
4.3.60.0630.0178.37
4.3.50.0600.0138.37
4.3.40.0800.0378.37
4.3.30.0300.0178.37
4.3.20.0500.0238.37
4.3.10.0400.0208.37
4.3.00.0470.0208.37

preferences:
40.63 ms | 401 KiB | 5 Q