3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar() { $foo = static function() { return get_class(); }; return $foo(); } static function baz() { $foo = function() { return get_called_class(); }; return $foo(); } } class Bar extends Foo { } assert(Bar::bar() === 'Bar'); assert(Bar::baz() === '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.40.0060.00918.83
8.3.30.0000.01418.71
8.3.20.0040.00418.91
8.3.10.0090.00018.86
8.3.00.0040.00419.26
8.2.170.0110.01122.96
8.2.160.0070.00720.69
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.00021.11
8.2.110.0110.00020.94
8.2.100.0060.00617.84
8.2.90.0030.00719.39
8.2.80.0000.00719.27
8.2.70.0030.00517.50
8.2.60.0040.00817.93
8.2.50.0040.00418.07
8.2.40.0030.00517.92
8.2.30.0050.00318.11
8.2.20.0030.00517.61
8.2.10.0080.00017.63
8.2.00.0040.00417.77
8.1.270.0050.00223.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.54
8.1.230.0070.00420.98
8.1.220.0040.00417.74
8.1.210.0030.00519.04
8.1.200.0050.00517.35
8.1.190.0020.00517.52
8.1.180.0040.00418.10
8.1.170.0000.00818.75
8.1.160.0040.00418.90
8.1.150.0000.00818.53
8.1.140.0070.00017.45
8.1.130.0070.00017.75
8.1.120.0040.00517.45
8.1.110.0040.00417.37
8.1.100.0030.00417.45
8.1.90.0030.00417.51
8.1.80.0030.00417.45
8.1.70.0000.00817.42
8.1.60.0000.00817.52
8.1.50.0000.00817.50
8.1.40.0030.00617.53
8.1.30.0040.00417.52
8.1.20.0060.00317.71
8.1.10.0070.00017.56
8.1.00.0030.00617.41
8.0.300.0050.00319.95
8.0.290.0040.00416.75
8.0.280.0040.00418.40
8.0.270.0000.00717.18
8.0.260.0000.00616.84
8.0.250.0080.00016.87
8.0.240.0000.01016.91
8.0.230.0000.00616.91
8.0.220.0030.00316.85
8.0.210.0030.00316.93
8.0.200.0080.00017.05
8.0.190.0030.00317.04
8.0.180.0080.00016.96
8.0.170.0000.01116.80
8.0.160.0040.00416.91
8.0.150.0030.00616.97
8.0.140.0050.00616.91
8.0.130.0030.00313.34
8.0.120.0050.00216.82
8.0.110.0000.00716.83
8.0.100.0040.00416.98
8.0.90.0000.00716.73
8.0.80.0070.01016.95
8.0.70.0000.00816.92
8.0.60.0000.00716.84
8.0.50.0000.00816.80
8.0.30.0120.00616.94
8.0.20.0050.01417.02
8.0.10.0000.00716.95
8.0.00.0040.01616.80
7.4.330.0020.00213.10
7.4.320.0030.00316.61
7.4.300.0030.00316.49
7.4.290.0030.00316.43
7.4.280.0060.00316.49
7.4.270.0000.00716.55
7.4.260.0000.00513.26
7.4.250.0030.00616.39
7.4.240.0030.00316.54
7.4.230.0030.00316.59
7.4.220.0030.01616.65
7.4.210.0060.01216.54
7.4.200.0050.00316.39
7.4.190.0000.00716.76
7.4.160.0060.00916.53
7.4.150.0060.01116.39
7.4.140.0110.00716.51
7.4.130.0190.00316.64
7.4.120.0100.00716.37
7.4.110.0090.00916.61
7.4.100.0170.00716.38
7.4.90.0100.01316.48
7.4.80.0160.00719.39
7.4.70.0050.01216.47
7.4.60.0060.01016.38
7.4.50.0000.00916.54
7.4.40.0080.00516.38
7.4.30.0140.00516.54
7.4.00.0060.00814.90
7.3.330.0030.00313.20
7.3.320.0030.00313.37
7.3.310.0000.00916.39
7.3.300.0040.00416.25
7.3.290.0030.01116.34
7.3.280.0080.01016.37
7.3.270.0070.01016.20
7.3.260.0100.01316.67
7.3.250.0050.01516.28
7.3.240.0130.00616.33
7.3.230.0100.00716.37
7.3.210.0130.00316.45
7.3.200.0110.00516.52
7.3.190.0030.01416.38
7.3.180.0080.00816.42
7.3.170.0120.01216.45
7.3.160.0130.00316.44
7.3.120.0060.01214.86
7.3.110.0100.00314.89
7.3.100.0140.00414.75
7.3.90.0030.01014.62
7.3.80.0060.00914.63
7.3.70.0100.00314.65
7.3.60.0000.00914.92
7.3.50.0040.00714.72
7.3.40.0060.00914.96
7.3.30.0050.00514.80
7.3.20.0070.00716.60
7.3.10.0070.01116.29
7.3.00.0050.00516.56
7.2.330.0000.01716.60
7.2.320.0070.01016.75
7.2.310.0070.01016.75
7.2.300.0150.00916.64
7.2.290.0130.00316.63
7.2.250.0040.01515.02
7.2.240.0000.01914.79
7.2.230.0130.00315.03
7.2.220.0040.01115.13
7.2.210.0040.00714.96
7.2.200.0030.01014.98
7.2.190.0120.00315.15
7.2.180.0000.01515.09
7.2.170.0080.00614.83
7.2.60.0100.00316.88
7.2.00.0030.01019.18
7.1.330.0070.00715.73
7.1.320.0070.00715.62
7.1.310.0070.00715.67
7.1.300.0130.00315.73
7.1.290.0030.00615.56
7.1.280.0040.01115.86
7.1.270.0090.00315.72
7.1.260.0070.01115.82
7.1.200.0090.00315.59
7.1.100.0070.00718.22
7.1.70.0040.00417.03
7.1.60.0070.01819.30
7.1.50.0000.01216.97
7.1.00.0000.08022.31
7.0.200.0040.00416.67
7.0.140.0070.09322.04
7.0.120.0030.06721.94
7.0.60.0170.08019.86
7.0.50.0030.04317.88
7.0.40.0070.05317.82
7.0.30.0100.08317.80
7.0.20.0100.07017.82
7.0.10.0070.08317.73
7.0.00.0170.06017.71
5.6.280.0000.07720.90
5.6.210.0030.06720.56
5.6.200.0070.04018.16
5.6.190.0130.07018.19
5.6.180.0100.05018.14
5.6.170.0030.06318.16
5.6.160.0070.06018.18
5.6.150.0100.05018.16
5.6.140.0070.08718.17
5.6.130.0130.06318.14
5.6.120.0130.07318.14
5.6.110.0030.04718.14
5.6.100.0000.04718.21
5.6.90.0170.03018.17
5.6.80.0030.05017.66
5.6.70.0130.04717.56
5.6.60.0070.08017.61
5.6.50.0030.05017.57
5.6.40.0030.04317.59
5.6.30.0030.06017.59
5.6.20.0100.04317.49
5.6.10.0030.07717.50
5.6.00.0100.07017.56
5.5.350.0100.07720.39
5.5.340.0070.05317.96
5.5.330.0100.08017.96
5.5.320.0100.03317.98
5.5.310.0070.08318.09
5.5.300.0000.08717.99
5.5.290.0000.09318.08
5.5.280.0030.08717.94
5.5.270.0030.04018.01
5.5.260.0130.07317.98
5.5.250.0070.07017.79
5.5.240.0070.08017.38
5.5.230.0100.05717.30
5.5.220.0030.06017.46
5.5.210.0070.04717.33
5.5.200.0130.06017.39
5.5.190.0070.04717.43
5.5.180.0000.04317.34
5.5.160.0100.07317.43
5.5.150.0100.06017.36
5.5.140.0230.06317.31
5.5.130.0100.07717.28
5.5.120.0070.08017.34
5.5.110.0130.08017.33
5.5.100.0170.06717.25
5.5.90.0070.08017.20
5.5.80.0070.08017.23
5.5.70.0030.08317.34
5.5.60.0130.06317.22
5.5.50.0030.06717.31
5.5.40.0100.06017.17
5.5.30.0030.08717.19
5.5.20.0070.07717.28
5.5.10.0100.04717.19
5.5.00.0070.05017.18
5.4.450.0070.08019.32
5.4.440.0100.07319.46
5.4.430.0070.07319.36
5.4.420.0100.05719.37
5.4.410.0100.07319.22
5.4.400.0070.05719.02
5.4.390.0030.05319.12
5.4.380.0130.06718.89
5.4.370.0030.07719.10
5.4.360.0130.07019.04
5.4.350.0070.06718.89
5.4.340.0030.04319.10
5.4.320.0100.07319.11
5.4.310.0070.07319.12
5.4.300.0070.07719.12
5.4.290.0100.07319.00
5.4.280.0070.06319.01
5.4.270.0000.08019.06
5.4.260.0130.04319.01
5.4.250.0070.08019.00
5.4.240.0070.07719.11
5.4.230.0230.06019.08
5.4.220.0070.06318.90
5.4.210.0070.06719.09
5.4.200.0170.07018.94
5.4.190.0000.05719.04
5.4.180.0030.04019.04
5.4.170.0030.08318.97
5.4.160.0130.04018.99
5.4.150.0170.06318.87
5.4.140.0100.07016.30
5.4.130.0030.04716.44
5.4.120.0070.06716.44
5.4.110.0130.07016.47
5.4.100.0100.06716.43
5.4.90.0130.02716.54
5.4.80.0070.06016.53
5.4.70.0000.07716.50
5.4.60.0030.07016.38
5.4.50.0130.04316.38
5.4.40.0030.07316.33
5.4.30.0030.07716.30
5.4.20.0000.04016.27
5.4.10.0000.04016.52
5.4.00.0000.03716.02
5.3.290.0070.06314.63
5.3.280.0070.07014.83
5.3.270.0030.04714.65
5.3.260.0030.06014.70
5.3.250.0030.04714.46
5.3.240.0170.06714.64
5.3.230.0070.04314.55
5.3.220.0000.08014.61
5.3.210.0100.06714.41
5.3.200.0070.04014.61
5.3.190.0030.08714.60
5.3.180.0030.08314.56
5.3.170.0070.07314.59
5.3.160.0030.08314.61
5.3.150.0070.07714.63
5.3.140.0030.05014.77
5.3.130.0000.05314.61
5.3.120.0070.04714.52
5.3.110.0070.04314.54
5.3.100.0100.03013.99
5.3.90.0070.03314.12
5.3.80.0000.04714.01
5.3.70.0000.04014.07
5.3.60.0000.03713.88
5.3.50.0070.03314.04
5.3.40.0070.03313.79
5.3.30.0000.03714.01
5.3.20.0000.03713.69
5.3.10.0000.03713.66
5.3.00.0100.02713.52
5.2.170.0000.03011.14
5.2.160.0070.02311.15
5.2.150.0070.02311.19
5.2.140.0030.03311.18
5.2.130.0070.04711.32
5.2.120.0030.02711.14
5.2.110.0070.02311.09
5.2.100.0000.03711.31
5.2.90.0000.03011.09
5.2.80.0030.02710.98
5.2.70.0030.02711.16
5.2.60.0000.03011.26
5.2.50.0000.03311.06
5.2.40.0030.02711.00
5.2.30.0000.03010.99
5.2.20.0070.02310.96
5.2.10.0100.02010.89
5.2.00.0100.02310.76
5.1.60.0030.0209.96
5.1.50.0070.0209.84
5.1.40.0000.02310.03
5.1.30.0000.02710.43
5.1.20.0000.02710.57
5.1.10.0030.02310.28
5.1.00.0030.02310.12
5.0.50.0000.0208.60
5.0.40.0000.0208.45
5.0.30.0000.0308.06
5.0.20.0030.0178.25
5.0.10.0000.0208.21
5.0.00.0000.0308.13
4.4.90.0070.0107.95
4.4.80.0000.0177.95
4.4.70.0000.0177.95
4.4.60.0070.0107.95
4.4.50.0000.0177.95
4.4.40.0000.0237.95
4.4.30.0030.0137.95
4.4.20.0000.0207.95
4.4.10.0000.0177.95
4.4.00.0000.0237.95
4.3.110.0030.0137.95
4.3.100.0030.0107.95
4.3.90.0000.0137.95
4.3.80.0000.0237.95
4.3.70.0000.0137.95
4.3.60.0000.0177.95
4.3.50.0000.0207.95
4.3.40.0030.0207.95
4.3.30.0000.0137.95
4.3.20.0000.0207.95
4.3.10.0000.0137.95
4.3.00.0000.0137.95

preferences:
41.27 ms | 400 KiB | 5 Q