3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar() { $foo = static function() { //var_dump( $this ); return get_called_class(); }; return $foo(); } function baz() { $foo = function() { print "baz: " . var_dump( $this); return get_called_class(); }; return $foo(); } } class Bar extends Foo { } // assert(Bar::bar() === 'Bar'); // assert(Bar::baz() === 'Bar'); Bar::baz();

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.0070.01418.55
8.3.50.0100.00521.91
8.3.40.0120.00318.79
8.3.30.0040.01118.75
8.3.20.0030.00618.91
8.3.10.0050.00321.09
8.3.00.0040.00421.96
8.2.180.0100.00616.63
8.2.170.0040.01122.96
8.2.160.0040.01120.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0050.00321.03
8.2.110.0090.00020.52
8.2.100.0040.00717.91
8.2.90.0080.00019.18
8.2.80.0000.00717.97
8.2.70.0050.00317.63
8.2.60.0060.00317.77
8.2.50.0040.00418.07
8.2.40.0030.00618.01
8.2.30.0000.00819.32
8.2.20.0050.00317.71
8.2.10.0050.00217.56
8.2.00.0030.00717.74
8.1.280.0040.01125.92
8.1.270.0080.00023.99
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0000.01022.35
8.1.230.0090.00320.95
8.1.220.0040.00418.77
8.1.210.0060.00318.84
8.1.200.0060.00317.13
8.1.190.0030.00617.41
8.1.180.0000.00818.10
8.1.170.0000.00718.46
8.1.160.0030.00318.77
8.1.150.0060.00318.43
8.1.140.0040.00417.20
8.1.130.0000.00817.68
8.1.120.0040.00417.35
8.1.110.0000.00817.34
8.1.100.0030.00517.30
8.1.90.0040.00417.21
8.1.80.0000.00717.34
8.1.70.0030.00617.20
8.1.60.0040.00417.51
8.1.50.0000.00817.38
8.1.40.0080.00017.52
8.1.30.0040.00417.63
8.1.20.0030.00517.50
8.1.10.0040.00417.53
8.1.00.0070.00017.44
8.0.300.0000.00719.89
8.0.290.0000.00717.05
8.0.280.0030.00318.46
8.0.270.0050.00317.04
8.0.260.0000.00616.82
8.0.250.0040.00416.86
8.0.240.0040.00416.92
8.0.230.0040.00416.86
8.0.220.0030.00316.84
8.0.210.0030.00316.90
8.0.200.0000.00816.95
8.0.190.0070.00016.89
8.0.180.0070.00016.81
8.0.170.0000.00816.91
8.0.160.0030.00316.79
8.0.150.0000.00716.84
8.0.140.0020.00516.86
8.0.130.0030.00313.42
8.0.120.0000.00716.82
8.0.110.0070.00016.92
8.0.100.0000.00716.96
8.0.90.0000.00716.84
8.0.80.0030.01516.88
8.0.70.0070.00016.79
8.0.60.0030.00516.94
8.0.50.0000.00716.81
8.0.30.0140.00517.13
8.0.20.0200.01917.40
8.0.10.0000.00716.77
8.0.00.0100.00716.74
7.4.330.0000.00616.85
7.4.320.0030.00616.51
7.4.300.0030.00316.57
7.4.290.0040.00416.50
7.4.280.0000.00716.48
7.4.270.0020.00516.65
7.4.260.0030.00313.28
7.4.250.0050.00216.36
7.4.240.0030.00316.51
7.4.230.0000.00716.58
7.4.220.0100.01016.56
7.4.210.0070.00816.66
7.4.200.0000.00716.48
7.4.190.0030.00316.41
7.4.160.0050.01116.51
7.4.150.0210.00617.40
7.4.140.0120.00617.86
7.4.130.0130.00316.51
7.4.120.0130.00516.59
7.4.110.0090.00616.70
7.4.100.0000.02016.40
7.4.90.0060.01016.43
7.4.80.0030.01419.39
7.4.70.0040.01416.59
7.4.60.0120.00416.54
7.4.50.0040.00416.65
7.4.40.0000.01522.77
7.4.30.0030.01216.62
7.4.00.0000.01615.17
7.3.330.0050.00013.39
7.3.320.0000.00513.30
7.3.310.0000.00716.22
7.3.300.0000.00716.23
7.3.290.0110.00716.37
7.3.280.0070.00716.33
7.3.270.0090.01517.40
7.3.260.0060.01218.24
7.3.250.0050.01216.52
7.3.240.0150.00316.46
7.3.230.0100.01016.39
7.3.210.0030.01316.47
7.3.200.0100.00819.39
7.3.190.0070.01416.38
7.3.180.0090.00616.46
7.3.170.0130.00316.33
7.3.160.0100.00716.43
7.3.120.0070.00714.82
7.2.330.0150.00316.38
7.2.320.0090.00916.72
7.2.310.0160.00416.71
7.2.300.0030.01316.52
7.2.290.0030.01416.55
7.2.60.0030.01316.96
7.2.00.0030.01019.11
7.1.200.0060.00315.69
7.1.100.0040.00817.84
7.1.70.0040.00417.30
7.1.60.0100.01319.40
7.1.50.0120.00916.94
7.1.00.0000.03722.48
7.0.200.0090.00016.74
7.0.140.0070.06321.95
7.0.60.0330.07720.02
7.0.50.0030.06017.82
7.0.40.0070.08320.30
7.0.30.0300.08020.30
7.0.20.0330.06720.17
7.0.10.0000.08020.16
7.0.00.0100.08720.09
5.6.280.0030.07320.82
5.6.210.0100.05320.48
5.6.200.0030.08318.25
5.6.190.0070.08020.57
5.6.180.0200.06720.61
5.6.170.0400.07320.44
5.6.160.0070.08320.51
5.6.150.0000.07018.29
5.6.140.0030.08018.15
5.6.130.0100.08018.14
5.6.120.0170.08021.03
5.6.110.0000.07720.98
5.6.100.0030.07321.14
5.6.90.0030.06321.09
5.6.80.0070.04720.40
5.5.350.0270.07320.34
5.5.340.0100.05318.09
5.5.330.0000.04720.25
5.5.320.0300.07320.32
5.5.310.0330.08020.37
5.5.300.0030.08718.01
5.5.290.0030.06318.08
5.5.280.0030.05320.97
5.5.270.0130.06720.73
5.5.260.0070.06320.85
5.5.250.0000.08020.70
5.5.240.0070.08020.20
5.4.450.3970.04019.46
5.4.440.0100.07319.57
5.4.430.1570.04719.48
5.4.420.4000.04319.48
5.4.410.3930.03719.13
5.4.400.3630.04019.11
5.4.390.4030.03719.26
5.4.380.3630.03319.13
5.4.370.3800.04019.19
5.4.360.3470.03719.10
5.4.350.3800.03318.93
5.4.340.3900.04018.91
5.4.320.3930.04019.14
5.4.310.3870.04019.19
5.4.300.2870.03718.92
5.4.290.3670.03719.21
5.4.280.3630.04019.04
5.4.270.4330.04319.24
5.4.260.3730.03719.14
5.4.250.3670.03718.91
5.4.240.3670.03319.23
5.4.230.3630.03319.14
5.4.220.3770.04318.91
5.4.210.4130.04719.03
5.4.200.3900.04319.10
5.4.190.3770.03318.95
5.4.180.3870.03719.23
5.4.170.3900.04019.09
5.4.160.4000.03719.22
5.4.150.3930.03018.94
5.4.140.3200.03016.40
5.4.130.3400.03316.36
5.4.120.4200.04316.25
5.4.110.3870.03316.69
5.4.100.3730.03716.30
5.4.90.3670.02716.32
5.4.80.4430.04716.29
5.4.70.3870.03316.52
5.4.60.3900.03316.33
5.4.50.3530.04316.61
5.4.40.3970.03016.47
5.4.30.3400.03316.50
5.4.20.3600.03316.21
5.4.10.3670.04016.41
5.4.00.4200.03315.77
5.3.290.3970.03314.66
5.3.280.3870.03314.65
5.3.270.4200.04714.76
5.3.260.3470.04014.49
5.3.250.3770.03314.66
5.3.240.3870.03714.63
5.3.230.4200.04314.67
5.3.220.3600.04014.47
5.3.210.3900.03714.45
5.3.200.3900.03714.73
5.3.190.3900.03714.62
5.3.180.4200.03314.56
5.3.170.3830.03714.56
5.3.160.3930.03014.61
5.3.150.4070.04014.57
5.3.140.3630.03314.61
5.3.130.3870.03714.55
5.3.120.3830.03314.63
5.3.110.3630.03714.58
5.3.100.3900.03314.11
5.3.90.3800.03314.04
5.3.80.3870.03014.09
5.3.70.1300.04314.04
5.3.60.0000.04314.00
5.3.50.0100.07314.00
5.3.40.3670.03013.98
5.3.30.3800.02313.90
5.3.20.4800.04313.73
5.3.10.4570.03713.80
5.3.00.4500.03013.64
5.2.170.0100.03311.29
5.2.160.3030.03011.16
5.2.150.3130.02311.03
5.2.140.3000.03011.18
5.2.130.3830.02711.14
5.2.120.3870.03011.07
5.2.110.3470.02311.10
5.2.100.3800.02710.99
5.2.90.3770.03011.11
5.2.80.3270.02311.15
5.2.70.3100.02311.15
5.2.60.3970.02711.05
5.2.50.3100.02310.98
5.2.40.2430.02711.08
5.2.30.2430.02310.93
5.2.20.2430.03010.92
5.2.10.0070.03710.83
5.2.00.0030.06010.87
5.1.60.0030.0579.96
5.1.50.1000.0509.99
5.1.40.2830.0209.98
5.1.30.3170.02010.39
5.1.20.2830.02310.39
5.1.10.3100.02710.09
5.1.00.2800.02710.21
5.0.50.1470.0238.63
5.0.40.1300.0208.42
5.0.30.1470.0308.13
5.0.20.1400.0238.22
5.0.10.1430.0208.08
5.0.00.1470.0338.13
4.4.90.1700.0237.09
4.4.80.0500.0237.09
4.4.70.1230.0137.09
4.4.60.0070.0307.09
4.4.50.0070.0237.09
4.4.40.0070.0477.09
4.4.30.1470.0107.09
4.4.20.1930.0177.09
4.4.10.1670.0137.09
4.4.00.1470.0307.09
4.3.110.1270.0137.09
4.3.100.1170.0177.09
4.3.90.1230.0177.09
4.3.80.1470.0277.09
4.3.70.1730.0177.09
4.3.60.1600.0137.09
4.3.50.1800.0137.09
4.3.40.1700.0207.09
4.3.30.1000.0207.09
4.3.20.1000.0177.09
4.3.10.0870.0137.09
4.3.00.0930.0207.09

preferences:
44.76 ms | 401 KiB | 5 Q