3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar() { $foo = function() { return get_called_class(); }; $foo->bindTo(null,Bar); print get_called_class(); return $foo(); } } class Bar extends Foo { } print Foo::bar(); print 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.0120.00318.33
8.3.50.0070.01022.05
8.3.40.0090.00918.68
8.3.30.0100.00319.09
8.3.20.0000.00720.34
8.3.10.0090.00023.61
8.3.00.0060.00317.63
8.2.180.0090.00618.40
8.2.170.0070.00722.96
8.2.160.0100.00320.34
8.2.150.0040.00424.18
8.2.140.0140.00424.66
8.2.130.0110.00726.16
8.2.120.0080.00022.26
8.2.110.0040.00422.25
8.2.100.0060.00618.03
8.2.90.0060.00319.34
8.2.80.0040.00418.04
8.2.70.0030.00517.75
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0000.00818.22
8.2.30.0000.00718.07
8.2.20.0040.00417.79
8.2.10.0050.00318.06
8.2.00.0000.01017.76
8.1.280.0160.00325.92
8.1.270.0040.00422.19
8.1.260.0100.01026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.68
8.1.230.0090.00319.02
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0030.00617.48
8.1.190.0090.00017.52
8.1.180.0000.00818.10
8.1.170.0040.00718.59
8.1.160.0000.00821.98
8.1.150.0040.00418.63
8.1.140.0040.00417.36
8.1.130.0030.00317.70
8.1.120.0030.00317.36
8.1.110.0030.00317.48
8.1.100.0000.00717.52
8.1.90.0040.00417.49
8.1.80.0030.00317.41
8.1.70.0070.00017.37
8.1.60.0130.00017.48
8.1.50.0000.00917.48
8.1.40.0040.00417.42
8.1.30.0000.00817.64
8.1.20.0000.00817.56
8.1.10.0000.00817.58
8.1.00.0040.00417.49
8.0.300.0070.00018.77
8.0.290.0040.00417.14
8.0.280.0030.00318.48
8.0.270.0030.00317.16
8.0.260.0080.00017.25
8.0.250.0000.00617.01
8.0.240.0040.00716.88
8.0.230.0030.00317.03
8.0.220.0000.00716.85
8.0.210.0000.00816.81
8.0.200.0060.00417.02
8.0.190.0030.00616.96
8.0.180.0070.00017.00
8.0.170.0050.00316.92
8.0.160.0000.00817.05
8.0.150.0050.00316.78
8.0.140.0040.00416.96
8.0.130.0050.00313.45
8.0.120.0000.00816.95
8.0.110.0050.00216.89
8.0.100.0040.00416.77
8.0.90.0030.00517.02
8.0.80.0130.00316.90
8.0.70.0040.00416.91
8.0.60.0000.00716.86
8.0.50.0040.00416.76
8.0.30.0100.01217.14
8.0.20.0130.00517.40
8.0.10.0000.00717.04
8.0.00.0090.01116.78
7.4.330.0000.00515.00
7.4.320.0030.00316.59
7.4.300.0040.00416.54
7.4.290.0000.00716.43
7.4.280.0030.00316.41
7.4.270.0040.00416.61
7.4.260.0030.00316.58
7.4.250.0040.00416.47
7.4.240.0050.00216.56
7.4.230.0000.00716.53
7.4.220.0080.00816.36
7.4.210.0090.00916.56
7.4.200.0030.00316.59
7.4.190.0090.00016.61
7.4.160.0060.00916.55
7.4.150.0090.00917.40
7.4.140.0090.00817.86
7.4.130.0100.00616.42
7.4.120.0070.01416.51
7.4.110.0120.00616.57
7.4.100.0090.01016.61
7.4.90.0090.00616.59
7.4.80.0120.00619.39
7.4.70.0140.00316.46
7.4.60.0130.01016.50
7.4.50.0030.00616.50
7.4.40.0090.00622.77
7.4.30.0090.00616.59
7.4.00.0080.01115.10
7.3.330.0000.00513.19
7.3.320.0020.00213.23
7.3.310.0040.00416.25
7.3.300.0000.00716.27
7.3.290.0060.00916.41
7.3.280.0110.00616.36
7.3.270.0070.01017.40
7.3.260.0090.00916.63
7.3.250.0120.00616.45
7.3.240.0070.01016.36
7.3.230.0130.00316.39
7.3.210.0120.00416.45
7.3.200.0170.00019.39
7.3.190.0060.01316.36
7.3.180.0040.01216.56
7.3.170.0080.00816.30
7.3.160.0120.00316.43
7.3.120.0060.01114.96
7.3.110.0080.00814.70
7.3.100.0160.00014.72
7.3.90.0070.00714.79
7.3.80.0070.01014.61
7.3.70.0060.00614.77
7.3.60.0000.01314.68
7.3.50.0070.00714.55
7.3.40.0030.00814.85
7.3.30.0090.00614.91
7.3.20.0100.00616.40
7.3.10.0040.00716.81
7.3.00.0090.00316.74
7.2.330.0120.00616.51
7.2.320.0120.00416.64
7.2.310.0100.00616.69
7.2.300.0040.01816.71
7.2.290.0130.00316.55
7.2.250.0070.01314.92
7.2.240.0120.00614.92
7.2.230.0070.00715.19
7.2.220.0040.01015.28
7.2.210.0130.00315.15
7.2.200.0100.00314.98
7.2.190.0070.00315.09
7.2.180.0080.00814.68
7.2.170.0060.00614.73
7.2.60.0030.01016.80
7.2.00.0080.00819.51
7.1.330.0090.00615.86
7.1.320.0100.00315.76
7.1.310.0060.00915.59
7.1.300.0000.01415.88
7.1.290.0030.00715.52
7.1.280.0040.00815.73
7.1.270.0030.01215.68
7.1.260.0030.00915.74
7.1.200.0000.00715.66
7.1.100.0040.00917.89
7.1.70.0040.00417.00
7.1.60.0070.01719.33
7.1.50.0170.00316.61
7.1.00.0070.07022.30
7.0.200.0130.00614.57
7.0.140.0100.06022.15
7.0.60.0030.05319.89
7.0.50.0030.07017.94
7.0.40.0070.06020.10
7.0.30.0200.05720.23
7.0.20.0230.08320.09
7.0.10.0030.07020.05
7.0.00.0100.08020.14
5.6.280.0030.07320.89
5.6.210.0070.07720.48
5.6.200.0130.06318.29
5.6.190.0030.04320.52
5.6.180.0230.05020.43
5.6.170.0270.04320.56
5.6.160.0000.05320.43
5.6.150.0100.07718.18
5.6.140.0030.06318.27
5.6.130.0070.08318.18
5.6.120.0030.04020.98
5.6.110.0030.04721.12
5.6.100.0100.05320.99
5.6.90.0170.07320.97
5.6.80.0030.03720.40
5.6.70.4370.04020.51
5.5.350.0130.06720.39
5.5.340.0100.07717.96
5.5.330.0130.05320.13
5.5.320.0070.05020.38
5.5.310.0130.04720.35
5.5.300.0070.08017.98
5.5.290.0070.08017.98
5.5.280.0100.08020.78
5.5.270.0000.06320.77
5.5.260.0100.07320.65
5.5.250.0130.06020.69
5.5.240.0230.07320.16
5.4.450.0170.05719.59
5.4.440.0170.06019.31
5.4.430.0200.05719.55
5.4.420.0170.06019.16
5.4.410.0230.04719.04
5.4.400.0170.06019.15
5.4.390.0170.05719.12
5.4.380.0200.05718.54
5.4.370.0470.06718.74
5.4.360.0370.06318.79
5.4.350.0430.05318.77
5.4.340.0430.07718.80
5.4.320.0090.04612.51
5.4.310.0080.03512.50
5.4.300.0020.04012.51
5.4.290.0040.03912.50
5.4.280.0060.05512.37
5.4.270.0100.04812.37
5.4.260.0190.05912.38
5.4.250.0110.05212.37
5.4.240.0140.04312.38
5.4.230.0150.06212.36
5.4.220.0100.05812.36
5.4.210.0150.04512.36
5.4.200.0080.05112.36
5.4.190.0100.05112.36
5.4.180.0080.05012.36
5.4.170.0060.05312.38
5.4.160.0080.04812.36
5.4.150.0130.04512.36
5.4.140.0080.05312.04
5.4.130.0080.04912.04
5.4.120.0110.04911.99
5.4.110.0080.05011.99
5.4.100.0150.05511.99
5.4.90.0160.05711.99
5.4.80.0080.06811.99
5.4.70.0090.05311.98
5.4.60.0140.05011.98
5.4.50.0120.04811.98
5.4.40.0150.04911.98
5.4.30.0090.05011.97
5.4.20.0060.05711.97
5.4.10.0110.05011.97
5.4.00.0080.05711.46
5.3.290.0040.04112.80
5.3.280.0180.05312.71
5.3.270.0100.06512.73
5.3.260.0160.06012.72
5.3.250.0130.05512.72
5.3.240.0070.05312.72
5.3.230.0130.05512.71
5.3.220.0110.05912.68
5.3.210.0140.05812.68
5.3.200.0080.05412.68
5.3.190.0080.05312.67
5.3.180.0130.04712.68
5.3.170.0090.05212.67
5.3.160.0130.04812.67
5.3.150.0080.05712.68
5.3.140.0080.05312.66
5.3.130.0110.05712.66
5.3.120.0090.05112.66
5.3.110.0070.05512.66
5.3.100.0150.04512.12
5.3.90.0110.05012.08
5.3.80.0090.04412.07
5.3.70.0090.05712.08
5.3.60.0110.04712.06
5.3.50.0100.04912.01
5.3.40.0090.05412.01
5.3.30.0130.05311.96
5.3.20.0110.03911.75
5.3.10.0070.03711.70
5.3.00.0090.05011.70
5.2.170.0100.0399.19
5.2.160.0090.0349.18
5.2.150.0060.0379.18
5.2.140.0080.0319.18
5.2.130.0060.0309.14
5.2.120.0090.0359.14
5.2.110.0070.0399.14
5.2.100.0080.0369.15
5.2.90.0070.0409.14
5.2.80.0050.0389.14
5.2.70.0070.0369.14
5.2.60.0070.0359.09
5.2.50.0060.0419.07
5.2.40.0080.0359.04
5.2.30.0060.0399.02
5.2.20.0050.0399.00
5.2.10.0070.0388.92
5.2.00.0070.0408.79
5.1.60.0050.0348.07
5.1.50.0070.0358.06
5.1.40.0070.0328.05
5.1.30.0090.0258.39
5.1.20.0090.0358.41
5.1.10.0070.0328.14
5.1.00.0050.0358.15
5.0.50.0070.0246.61
5.0.40.0060.0266.48
5.0.30.0030.0416.29
5.0.20.0080.0236.26
5.0.10.0050.0286.23
5.0.00.0070.0386.22
4.4.90.0060.0194.78
4.4.80.0060.0184.76
4.4.70.0050.0204.76
4.4.60.0050.0204.75
4.4.50.0070.0214.77
4.4.40.0050.0344.70
4.4.30.0030.0214.76
4.4.20.0050.0204.84
4.4.10.0040.0224.85
4.4.00.0040.0314.76
4.3.110.0040.0224.67
4.3.100.0050.0204.67
4.3.90.0040.0214.63
4.3.80.0030.0314.59
4.3.70.0050.0194.63
4.3.60.0040.0204.63
4.3.50.0040.0234.63
4.3.40.0040.0334.54
4.3.30.0050.0203.29
4.3.20.0040.0223.27
4.3.10.0020.0223.23
4.3.00.0030.0206.73

preferences:
58.61 ms | 401 KiB | 5 Q