3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar() { $foo = static function() { return get_called_class(); }; return $foo(); } static function baz() { $foo = function() { return get_called_class(); }; return $foo(); } function rebind() { $foo = static function() { return get_called_class(); }; $oFoo=new Foo; return $foo; } } class Bar extends Foo { } //print Bar::bar() . Bar::baz() . $reb= Bar::rebind(); print $reb() . "<BR>" . Bar::bar(); // 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.60.0040.01118.68
8.3.50.0090.00921.99
8.3.40.0180.00018.88
8.3.30.0100.00318.50
8.3.20.0000.00818.51
8.3.10.0060.00321.09
8.3.00.0080.00021.73
8.2.180.0160.00016.75
8.2.170.0180.00422.96
8.2.160.0000.01420.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00321.07
8.2.110.0110.00020.44
8.2.100.0000.01117.91
8.2.90.0070.00019.23
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0000.00717.93
8.2.50.0050.00518.07
8.2.40.0000.00818.22
8.2.30.0000.00719.31
8.2.20.0060.00317.59
8.2.10.0000.00717.66
8.2.00.0030.00517.69
8.1.280.0110.00725.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00722.42
8.1.230.0060.00621.04
8.1.220.0030.00518.77
8.1.210.0040.00418.79
8.1.200.0060.00317.23
8.1.190.0000.00717.39
8.1.180.0000.00818.10
8.1.170.0000.00818.61
8.1.160.0000.00718.68
8.1.150.0040.00518.44
8.1.140.0040.00417.24
8.1.130.0030.00317.68
8.1.120.0040.00317.36
8.1.110.0030.00617.21
8.1.100.0070.00017.24
8.1.90.0040.00417.23
8.1.80.0000.00717.38
8.1.70.0000.00817.30
8.1.60.0000.00917.56
8.1.50.0040.00417.33
8.1.40.0040.00417.35
8.1.30.0040.00417.48
8.1.20.0040.00417.57
8.1.10.0040.00417.50
8.1.00.0080.00017.46
8.0.300.0070.00020.04
8.0.290.0060.00317.05
8.0.280.0070.00018.29
8.0.270.0060.00417.26
8.0.260.0000.00716.74
8.0.250.0070.00016.90
8.0.240.0080.00016.95
8.0.230.0000.00816.84
8.0.220.0000.00716.79
8.0.210.0000.00716.80
8.0.200.0000.00617.00
8.0.190.0000.00816.99
8.0.180.0040.00416.96
8.0.170.0040.00416.91
8.0.160.0040.00416.88
8.0.150.0070.00016.83
8.0.140.0030.00316.75
8.0.130.0000.00613.29
8.0.120.0000.00716.84
8.0.110.0000.00716.74
8.0.100.0000.00717.01
8.0.90.0000.00717.01
8.0.80.0080.00716.88
8.0.70.0040.00416.84
8.0.60.0040.00416.96
8.0.50.0080.00017.01
8.0.30.0140.00417.12
8.0.20.0130.00817.40
8.0.10.0000.00717.06
8.0.00.0110.00616.80
7.4.330.0050.00016.71
7.4.320.0000.00616.41
7.4.300.0000.00716.46
7.4.290.0000.00716.59
7.4.280.0000.00716.49
7.4.270.0000.00716.62
7.4.260.0000.00613.34
7.4.250.0000.00716.55
7.4.240.0030.00316.54
7.4.230.0030.00316.52
7.4.220.0110.00716.44
7.4.210.0080.00916.58
7.4.200.0030.00316.70
7.4.190.0050.00316.47
7.4.160.0080.00816.79
7.4.150.0100.01017.40
7.4.140.0090.00917.86
7.4.130.0030.01516.58
7.4.120.0090.00916.51
7.4.110.0080.00816.61
7.4.100.0070.01016.58
7.4.90.0110.00616.70
7.4.80.0000.01719.39
7.4.70.0100.00716.59
7.4.60.0060.01116.48
7.4.50.0030.00616.34
7.4.40.0000.01322.77
7.4.30.0100.00616.41
7.4.10.0060.01014.86
7.4.00.0060.01114.77
7.3.330.0000.00613.43
7.3.320.0030.00213.18
7.3.310.0040.00216.38
7.3.300.0030.00316.23
7.3.290.0100.00316.42
7.3.280.0070.00916.37
7.3.270.0080.00817.40
7.3.260.0110.00818.24
7.3.250.0090.01116.26
7.3.240.0060.01016.63
7.3.230.0130.00716.39
7.3.210.0000.01616.25
7.3.200.0040.01719.39
7.3.190.0100.01016.20
7.3.180.0110.00416.60
7.3.170.0090.00616.34
7.3.160.0070.01116.33
7.3.130.0120.00615.04
7.3.120.0080.00814.74
7.3.110.0100.01014.89
7.3.100.0070.00714.69
7.3.90.0040.01214.75
7.3.80.0030.01014.92
7.3.70.0060.00914.65
7.3.60.0110.00414.50
7.3.50.0100.00314.87
7.3.40.0080.00414.47
7.3.30.0070.00314.60
7.3.20.0080.00516.40
7.3.10.0120.00716.42
7.3.00.0100.00716.43
7.2.330.0120.00916.46
7.2.320.0140.00316.41
7.2.310.0100.01316.45
7.2.300.0070.01016.75
7.2.290.0100.00616.35
7.2.260.0070.01014.79
7.2.250.0070.01014.72
7.2.240.0060.00914.66
7.2.230.0030.01314.94
7.2.220.0070.01314.82
7.2.210.0060.00915.00
7.2.200.0070.00715.04
7.2.190.0100.00714.98
7.2.180.0080.00315.00
7.2.170.0030.01214.97
7.2.160.0120.00315.04
7.2.150.0030.01016.82
7.2.140.0040.00816.78
7.2.130.0100.00816.89
7.2.120.0070.01016.48
7.2.110.0070.01016.70
7.2.100.0070.01016.60
7.2.90.0090.01016.77
7.2.80.0120.00817.00
7.2.70.0090.00716.79
7.2.60.0110.00416.54
7.2.50.0070.01116.91
7.2.40.0070.00716.75
7.2.30.0100.00716.57
7.2.20.0080.01016.74
7.2.10.0130.00716.70
7.2.00.0100.00617.59
7.1.330.0070.00715.41
7.1.320.0060.00915.65
7.1.310.0030.00715.71
7.1.300.0070.00715.73
7.1.290.0060.00315.75
7.1.280.0070.00315.71
7.1.270.0090.00315.62
7.1.260.0030.00915.75
7.1.250.0060.00915.50
7.1.240.0110.00415.77
7.1.230.0060.00915.71
7.1.220.0000.01015.70
7.1.210.0030.01015.74
7.1.200.0020.00915.72
7.1.190.0060.01015.67
7.1.180.0080.00015.37
7.1.170.0120.00615.71
7.1.160.0030.01215.75
7.1.150.0070.00715.86
7.1.140.0120.00315.54
7.1.130.0100.00715.85
7.1.120.0040.00715.59
7.1.110.0050.00315.61
7.1.100.0070.00616.71
7.1.90.0100.00315.60
7.1.80.0060.00315.79
7.1.70.0030.00616.34
7.1.60.0130.00617.54
7.1.50.0110.01225.19
7.1.40.0100.00715.50
7.1.30.0060.00315.85
7.1.20.0030.01015.46
7.1.10.0120.00015.54
7.1.00.0030.02018.94
7.0.330.0060.00915.30
7.0.320.0030.00615.31
7.0.310.0090.00315.45
7.0.300.0000.01715.39
7.0.290.0000.00815.14
7.0.280.0040.00815.60
7.0.270.0070.01015.37
7.0.260.0030.00715.36
7.0.250.0070.00415.16
7.0.240.0000.00815.11
7.0.230.0030.00715.36
7.0.220.0080.00015.18
7.0.210.0000.00815.31
7.0.200.0000.01116.04
7.0.190.0070.01015.46
7.0.180.0040.01115.43
7.0.170.0110.00415.49
7.0.160.0060.00615.33
7.0.150.0060.00615.43
7.0.140.0140.03218.50
7.0.130.0040.01515.41
7.0.120.0030.01015.45
7.0.110.0000.01315.52
7.0.100.0130.04717.63
7.0.90.0050.04717.71
7.0.80.0160.03517.65
7.0.70.0250.03717.76
7.0.60.0130.03317.66
7.0.50.0150.04217.76
7.0.40.0070.03916.75
7.0.30.0080.04316.70
7.0.20.0130.02816.70
7.0.10.0090.04316.82
7.0.00.0070.02816.81
5.6.400.0090.00613.95
5.6.390.0030.00614.29
5.6.380.0040.01114.33
5.6.370.0070.01013.98
5.6.360.0040.01414.40
5.6.350.0030.01014.32
5.6.340.0030.00914.45
5.6.330.0060.00614.25
5.6.320.0040.00714.61
5.6.310.0040.00814.11
5.6.300.0030.00714.10
5.6.290.0070.01014.25
5.6.280.0030.04517.58
5.6.270.0070.01014.29
5.6.260.0060.00914.41
5.6.250.0130.04017.35
5.6.240.0060.04817.61
5.6.230.0080.02817.52
5.6.220.0100.03817.54
5.6.210.0060.02717.44
5.6.200.0060.03017.71
5.6.190.0030.04017.67
5.6.180.0060.04117.76
5.6.170.0100.03717.78
5.6.160.0070.04717.73
5.6.150.0110.03817.59
5.6.140.0090.02317.69
5.6.130.0050.04517.61
5.6.120.0070.03017.60
5.6.110.0030.02817.74
5.6.100.0080.04217.58
5.6.90.0050.03317.64
5.6.80.0050.03817.25
5.6.70.0070.04217.35
5.6.60.0090.03817.24
5.6.50.0050.04217.41
5.6.40.0020.02517.35
5.6.30.0110.03717.23
5.6.20.0180.02017.39
5.6.10.0120.03717.46
5.6.00.0030.04417.38
5.5.380.0060.04317.41
5.5.370.0090.03917.40
5.5.360.0050.03817.35
5.5.350.0100.04017.29
5.5.340.0030.05117.50
5.5.330.0080.03917.53
5.5.320.0080.03517.50
5.5.310.0080.04017.45
5.5.300.0070.04217.47
5.5.290.0090.03917.48
5.5.280.0040.04717.45
5.5.270.0030.04717.51
5.5.260.0040.02717.50
5.5.250.0080.04117.45
5.5.240.0050.03317.27
5.5.230.0050.04517.25
5.5.220.0110.03517.23
5.5.210.0070.02317.30
5.5.200.0050.02217.11
5.5.190.0030.04517.13
5.5.180.0060.02517.37
5.5.170.0000.01014.10
5.5.160.0020.05017.15
5.5.150.0070.04316.95
5.5.140.0030.04617.00
5.5.130.0020.04817.15
5.5.120.0080.02817.26
5.5.110.0030.03617.10
5.5.100.0070.02517.04
5.5.90.0130.03217.03
5.5.80.0090.03617.27
5.5.70.0030.04317.19
5.5.60.0070.03317.19
5.5.50.0110.02516.89
5.5.40.0050.02617.15
5.5.30.0050.02317.03
5.5.20.0120.03117.02
5.5.10.0050.02316.93
5.5.00.0030.04216.95
5.4.450.0050.03815.50
5.4.440.0030.02915.63
5.4.430.0050.02015.53
5.4.420.0040.04315.57
5.4.410.0090.03715.58
5.4.400.0050.02015.49
5.4.390.0050.04015.41
5.4.380.0050.01915.50
5.4.370.0090.03515.51
5.4.360.0080.03915.49
5.4.350.0050.03015.32
5.4.340.0070.02215.46
5.4.330.0000.01311.79
5.4.320.0050.04515.40
5.4.310.0070.04115.51
5.4.300.0060.02515.42
5.4.290.0080.04015.50
5.4.280.0110.03115.47
5.4.270.0000.02815.50
5.4.260.0030.04215.37
5.4.250.0100.03115.35
5.4.240.0050.04115.38
5.4.230.0040.04215.34
5.4.220.0030.03015.41
5.4.210.0050.03015.50
5.4.200.0080.04015.41
5.4.190.0050.03315.41
5.4.180.0020.02615.34
5.4.170.0030.04015.43
5.4.160.0090.03715.46
5.4.150.0090.03215.41
5.4.140.0050.02314.15
5.4.130.0050.02814.13
5.4.120.0070.02114.14
5.4.110.0050.03414.17
5.4.100.0030.04014.10
5.4.90.0000.02714.16
5.4.80.0050.01814.15
5.4.70.0020.03314.16
5.4.60.0080.03314.05
5.4.50.0110.01414.10
5.4.40.0030.03514.15
5.4.30.0050.02414.13
5.4.20.0000.02414.02
5.4.10.0060.03914.13
5.4.00.0050.02013.77
5.3.290.0000.03813.30
5.3.280.0070.03413.18
5.3.270.0030.03813.21
5.3.260.0040.02713.17
5.3.250.0020.02213.24
5.3.240.0030.02313.18
5.3.230.0050.01813.27
5.3.220.0020.04013.21
5.3.210.0030.04113.23
5.3.200.0060.01713.20
5.3.190.0050.02213.19
5.3.180.0040.01813.15
5.3.170.0030.04013.19
5.3.160.0030.04013.19
5.3.150.0060.04113.16
5.3.140.0030.04013.15
5.3.130.0070.03513.14
5.3.120.0050.04113.15
5.3.110.0100.03513.16
5.3.100.0030.04612.95
5.3.90.0030.02112.90
5.3.80.0050.01712.96
5.3.70.0050.04212.87
5.3.60.0050.03712.86
5.3.50.0050.03512.91
5.3.40.0080.02812.82
5.3.30.0050.03612.89
5.3.20.0050.03512.71
5.3.10.0060.03012.72
5.3.00.0070.03212.71
5.2.170.0030.06311.13
5.2.160.0030.05011.22
5.2.150.0030.05311.20
5.2.140.0030.04011.04
5.2.130.0070.04711.10
5.2.120.0000.05311.02
5.2.110.0000.03010.98
5.2.100.0070.05711.15
5.2.90.0070.05711.15
5.2.80.0030.03311.20
5.2.70.0100.05711.16
5.2.60.0070.03311.19
5.2.50.0000.05711.11
5.2.40.0000.04310.89
5.2.30.0030.06311.03
5.2.20.0100.05310.86
5.2.10.0030.03310.91
5.2.00.0030.05310.78
5.1.60.0000.05710.11
5.1.50.0000.0479.84
5.1.40.0030.05310.08
5.1.30.0100.02310.33
5.1.20.0000.03310.40
5.1.10.0030.02710.18
5.1.00.0100.0209.96
5.0.50.0030.0378.62
5.0.40.0100.0408.27
5.0.30.0030.0638.30
5.0.20.0070.0378.27
5.0.10.0000.0338.27
5.0.00.0070.0608.27
4.4.90.0030.0138.27
4.4.80.0000.0338.27
4.4.70.0000.0378.27
4.4.60.0070.0338.27
4.4.50.0070.0278.27
4.4.40.0100.0238.27
4.4.30.0030.0338.27
4.4.20.0030.0338.27
4.4.10.0030.0378.27
4.4.00.0000.0478.27
4.3.110.0030.0338.27
4.3.100.0070.0308.27
4.3.90.0000.0378.27
4.3.80.0030.0378.27
4.3.70.0000.0378.27
4.3.60.0130.0238.27
4.3.50.0030.0338.27
4.3.40.0030.0378.27
4.3.30.0030.0308.27
4.3.20.0030.0308.27
4.3.10.0000.0238.27
4.3.00.0030.0338.27

preferences:
34.42 ms | 401 KiB | 5 Q