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(); } static function rebind() { $foo = function() { return get_called_class(); }; $oFoo=new Foo; return $foo->bindTo(null,Foo); } } class Bar extends Foo { } //print Bar::bar() . Bar::baz() . print Bar::rebind(); 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.0090.00618.68
8.3.50.0140.00621.92
8.3.40.0150.00618.79
8.3.30.0040.01118.82
8.3.20.0050.00318.73
8.3.10.0070.00021.06
8.3.00.0040.00421.77
8.2.180.0040.01116.63
8.2.170.0070.01422.96
8.2.160.0040.01120.35
8.2.150.0030.00524.18
8.2.140.0090.00024.66
8.2.130.0070.00026.16
8.2.120.0050.00321.00
8.2.110.0090.00019.30
8.2.100.0040.00817.72
8.2.90.0050.00219.05
8.2.80.0050.00317.97
8.2.70.0030.00717.50
8.2.60.0080.00017.92
8.2.50.0040.00418.07
8.2.40.0030.00518.13
8.2.30.0040.00419.52
8.2.20.0040.00417.79
8.2.10.0040.00417.70
8.2.00.0050.00317.77
8.1.280.0110.00725.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0070.00422.02
8.1.230.0080.00421.03
8.1.220.0040.00418.77
8.1.210.0030.00618.86
8.1.200.0060.00317.47
8.1.190.0040.00417.53
8.1.180.0000.00818.10
8.1.170.0060.00318.66
8.1.160.0000.00718.79
8.1.150.0000.00718.77
8.1.140.0040.00417.54
8.1.130.0030.00317.77
8.1.120.0040.00417.47
8.1.110.0040.00417.48
8.1.100.0070.00017.52
8.1.90.0000.00817.45
8.1.80.0000.00817.47
8.1.70.0000.00717.36
8.1.60.0080.00017.59
8.1.50.0040.00417.35
8.1.40.0040.00417.56
8.1.30.0030.00517.54
8.1.20.0040.00417.69
8.1.10.0000.00817.59
8.1.00.0000.00717.52
8.0.300.0050.00320.07
8.0.290.0040.00417.15
8.0.280.0030.00318.46
8.0.270.0000.00717.20
8.0.260.0030.00316.86
8.0.250.0040.00416.98
8.0.240.0050.00317.02
8.0.230.0070.00016.88
8.0.220.0030.00317.01
8.0.210.0000.00916.93
8.0.200.0000.00617.03
8.0.190.0000.00717.01
8.0.180.0040.00416.96
8.0.170.0070.00016.89
8.0.160.0040.00416.93
8.0.150.0000.00716.98
8.0.140.0000.00716.93
8.0.130.0000.00613.30
8.0.120.0040.00416.86
8.0.110.0040.00416.96
8.0.100.0040.00417.00
8.0.90.0040.00416.80
8.0.80.0030.01716.98
8.0.70.0000.00716.91
8.0.60.0040.00416.78
8.0.50.0050.00216.78
8.0.30.0060.01316.90
8.0.20.0100.01017.40
8.0.10.0040.00417.19
8.0.00.0130.00516.63
7.4.330.0000.00616.84
7.4.320.0030.00316.62
7.4.300.0050.00216.62
7.4.290.0000.00716.42
7.4.280.0030.00316.42
7.4.270.0030.00316.67
7.4.260.0000.00813.27
7.4.250.0040.00416.46
7.4.240.0000.00816.38
7.4.230.0030.00316.40
7.4.220.0030.01216.59
7.4.210.0070.00816.53
7.4.200.0060.00016.69
7.4.190.0000.00716.48
7.4.160.0130.01016.70
7.4.150.0110.00617.40
7.4.140.0170.00617.86
7.4.130.0090.00916.65
7.4.120.0100.01016.62
7.4.110.0100.00616.53
7.4.100.0090.01316.54
7.4.90.0130.00416.63
7.4.80.0040.01219.39
7.4.70.0070.01016.53
7.4.60.0070.01016.43
7.4.50.0000.00616.75
7.4.40.0070.00722.77
7.4.30.0150.00016.57
7.4.00.0070.00715.07
7.3.330.0020.00213.22
7.3.320.0000.00513.31
7.3.310.0040.00416.48
7.3.300.0030.00316.36
7.3.290.0030.01716.28
7.3.280.0090.00816.36
7.3.270.0100.00717.40
7.3.260.0090.00918.24
7.3.250.0120.01116.42
7.3.240.0070.01016.34
7.3.230.0130.00316.39
7.3.210.0100.00716.57
7.3.200.0130.01019.39
7.3.190.0080.00916.54
7.3.180.0040.01416.53
7.3.170.0100.01016.29
7.3.160.0110.00516.31
7.3.120.0040.01114.54
7.3.10.0080.00016.64
7.3.00.0040.00816.72
7.2.330.0090.00916.42
7.2.320.0090.00916.69
7.2.310.0100.00716.79
7.2.300.0030.02116.74
7.2.290.0070.01316.60
7.2.130.0060.00617.03
7.2.120.0090.00616.99
7.2.110.0060.00817.02
7.2.100.0000.00916.88
7.2.90.0060.00316.88
7.2.80.0070.00417.10
7.2.70.0030.01017.13
7.2.60.0060.00817.00
7.2.50.0030.01017.04
7.2.40.0070.00317.05
7.2.30.0000.00916.80
7.2.20.0030.00716.80
7.2.10.0050.00516.75
7.2.00.0080.00818.14
7.1.250.0040.00815.75
7.1.200.0060.00615.43
7.1.100.0090.00017.92
7.1.70.0060.00316.81
7.1.60.0170.00719.40
7.1.50.0200.01034.79
7.1.00.0000.03722.37
7.0.200.0000.00916.73
7.0.140.0070.07021.99
7.0.60.0070.05719.84
7.0.50.0030.05317.89
7.0.40.0130.04720.09
7.0.30.0570.06720.30
7.0.20.0230.06720.15
7.0.10.0170.04320.18
7.0.00.0230.07020.41
5.6.280.0100.06721.16
5.6.210.0100.07720.56
5.6.200.0030.05318.25
5.6.190.0170.07320.57
5.6.180.0270.07020.35
5.6.170.0200.07020.47
5.6.160.0100.06320.44
5.6.150.0100.06318.18
5.6.140.0130.07718.20
5.6.130.0170.07718.16
5.6.120.0100.06021.04
5.6.110.0100.05021.00
5.6.100.0100.08320.97
5.6.90.0000.09720.98
5.6.80.0200.07020.37
5.6.70.0230.05020.41
5.5.350.0230.05020.40
5.5.340.0100.05017.96
5.5.330.0100.06720.43
5.5.320.0200.06320.28
5.5.310.0300.06320.23
5.5.300.0100.06318.08
5.5.290.0100.04018.08
5.5.280.0070.05720.96
5.5.270.0070.07720.98
5.5.260.0030.08720.65
5.5.250.0070.06720.80
5.5.240.0130.06020.25
5.4.450.0300.05319.55
5.4.440.0170.05019.32
5.4.430.0370.06719.56
5.4.420.0200.04719.48
5.4.410.0200.06319.28
5.4.400.0170.04019.00
5.4.390.0130.06318.87
5.4.380.0200.04719.08
5.4.370.0230.03719.19
5.4.360.0300.03018.98
5.4.350.0170.04718.98
5.4.340.0200.06318.99
5.4.320.0170.03719.31
5.4.310.0230.05319.14
5.4.300.0170.07719.00
5.4.290.0270.07319.14
5.4.280.0230.04319.19
5.4.270.0230.07019.15
5.4.260.0100.04318.85
5.4.250.0170.08018.98
5.4.240.0070.06019.03
5.4.230.0230.07319.07
5.4.220.0130.07319.21
5.4.210.0270.06019.07
5.4.200.0230.03018.93
5.4.190.0170.08018.97
5.4.180.0200.07319.30
5.4.170.0200.06019.05
5.4.160.0200.06019.22
5.4.150.0130.04719.17
5.4.140.0170.06316.52
5.4.130.0230.04316.56
5.4.120.0200.03316.43
5.4.110.0130.07316.52
5.4.100.0170.05316.59
5.4.90.0170.04016.56
5.4.80.0500.04316.44
5.4.70.0200.07016.49
5.4.60.0200.05716.18
5.4.50.0230.05716.48
5.4.40.0270.05716.43
5.4.30.0230.04716.42
5.4.20.0200.04316.26
5.4.10.0230.05316.51
5.4.00.0200.07315.91
5.3.290.0300.07014.71
5.3.280.0270.07014.51
5.3.270.0100.05014.50
5.3.260.0200.07014.52
5.3.250.0170.04014.51
5.3.240.0230.07014.71
5.3.230.0170.04014.71
5.3.220.0200.04714.48
5.3.210.0270.06714.61
5.3.200.0170.07314.57
5.3.190.0330.06314.57
5.3.180.0230.05714.57
5.3.170.0200.07314.61
5.3.160.0200.05714.72
5.3.150.0270.05314.79
5.3.140.0230.06714.65
5.3.130.0130.04314.60
5.3.120.0130.08014.54
5.3.110.0100.04314.47
5.3.100.0170.05714.20
5.3.90.0130.05313.94
5.3.80.0200.06014.14
5.3.70.0270.06014.02
5.3.60.0130.05014.00
5.3.50.0300.06014.10
5.3.40.0130.05014.03
5.3.30.0200.05013.82
5.3.20.0270.03313.74
5.3.10.0200.06713.74
5.3.00.0270.04713.64
5.2.170.0170.04012.13
5.2.160.0130.05712.13
5.2.150.0130.03312.13
5.2.140.0130.03712.13
5.2.130.0170.06712.13
5.2.120.0230.04312.13
5.2.110.0070.05012.13
5.2.100.0230.06012.13
5.2.90.0100.05012.13
5.2.80.0230.03012.13
5.2.70.0130.06012.13
5.2.60.0230.04012.13
5.2.50.0130.06012.13
5.2.40.0100.03312.13
5.2.30.0100.04012.13
5.2.20.0200.05312.13
5.2.10.0100.03712.13
5.2.00.0100.03312.13
5.1.60.0130.02712.13
5.1.50.0200.04712.13
5.1.40.0200.03312.13
5.1.30.0100.03012.13
5.1.20.0070.03012.13
5.1.10.0130.03312.13
5.1.00.0130.03012.13
5.0.50.0030.03312.13
5.0.40.0100.03712.13
5.0.30.0100.06012.13
5.0.20.0100.04312.13
5.0.10.0070.02312.13
5.0.00.0070.06312.13
4.4.90.0070.01712.13
4.4.80.0030.02312.13
4.4.70.0030.03012.13
4.4.60.0030.02312.13
4.4.50.0030.04012.13
4.4.40.0030.04712.13
4.4.30.0030.03712.13
4.4.20.0130.03012.13
4.4.10.0000.04012.13
4.4.00.0000.05312.13
4.3.110.0070.03012.13
4.3.100.0100.02312.13
4.3.90.0130.02712.13
4.3.80.0130.04712.13
4.3.70.0070.03712.13
4.3.60.0100.02312.13
4.3.50.0070.03012.13
4.3.40.0030.04312.13
4.3.30.0030.02712.13
4.3.20.0000.03712.13
4.3.10.0070.03312.13
4.3.00.0030.03712.13

preferences:
37.92 ms | 401 KiB | 5 Q