3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public $baz = 'newfoo'; function bar() { $cl = function() { var_dump($this); }; $this->baz = 'newfoo2'; return $cl; } } $f = new foo; $cl = $f->bar(); $cl();

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.0000.01416.72
8.3.50.0100.00517.40
8.3.40.0040.01118.63
8.3.30.0140.00318.79
8.3.20.0030.01618.74
8.3.10.0040.00420.36
8.3.00.0080.00019.26
8.2.180.0070.01418.29
8.2.170.0110.00722.96
8.2.160.0120.00321.20
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00820.63
8.2.110.0090.00020.81
8.2.100.0090.00317.50
8.2.90.0040.00419.34
8.2.80.0040.00819.43
8.2.70.0000.00917.63
8.2.60.0060.00317.93
8.2.50.0060.00318.07
8.2.40.0000.00718.16
8.2.30.0000.00718.02
8.2.20.0050.00217.60
8.2.10.0050.00317.56
8.2.00.0060.00317.67
8.1.280.0100.01025.92
8.1.270.0000.00824.66
8.1.260.0030.00626.35
8.1.250.0030.00528.09
8.1.240.0030.00622.55
8.1.230.0070.00320.88
8.1.220.0050.00317.74
8.1.210.0030.00518.91
8.1.200.0030.00617.35
8.1.190.0030.00617.53
8.1.180.0060.00318.10
8.1.170.0050.00218.84
8.1.160.0040.00418.88
8.1.150.0040.00418.60
8.1.140.0030.00517.45
8.1.130.0070.00017.81
8.1.120.0040.00417.44
8.1.110.0040.00417.44
8.1.100.0020.00517.48
8.1.90.0040.00417.39
8.1.80.0040.00417.41
8.1.70.0050.00217.44
8.1.60.0000.00817.49
8.1.50.0030.00517.46
8.1.40.0040.00417.49
8.1.30.0030.00617.64
8.1.20.0050.00317.58
8.1.10.0060.00317.51
8.1.00.0000.00717.33
8.0.300.0070.00019.95
8.0.290.0030.00616.58
8.0.280.0070.00018.51
8.0.270.0000.00817.12
8.0.260.0000.00716.75
8.0.250.0070.00316.94
8.0.240.0030.00316.90
8.0.230.0070.00016.82
8.0.220.0040.00416.83
8.0.210.0030.00316.80
8.0.200.0000.00716.84
8.0.190.0080.00016.84
8.0.180.0000.00716.81
8.0.170.0000.00816.94
8.0.160.0070.00016.86
8.0.150.0000.00816.81
8.0.140.0070.00016.82
8.0.130.0040.00413.33
8.0.120.0070.00016.73
8.0.110.0080.00016.93
8.0.100.0030.00316.79
8.0.90.0000.00716.72
8.0.80.0070.01416.86
8.0.70.0050.00216.79
8.0.60.0050.00216.91
8.0.50.0080.00016.86
8.0.30.0050.01517.09
8.0.20.0130.00716.98
8.0.10.0000.00717.03
8.0.00.0130.00616.73
7.4.330.0000.00612.96
7.4.320.0030.00316.62
7.4.300.0030.00316.65
7.4.290.0000.00616.65
7.4.280.0060.00316.52
7.4.270.0040.00416.51
7.4.260.0020.00213.23
7.4.250.0000.00716.62
7.4.240.0030.00316.61
7.4.230.0070.00016.67
7.4.220.0140.00316.67
7.4.210.0070.01116.54
7.4.200.0040.00416.46
7.4.190.0030.00316.47
7.4.160.0060.01116.47
7.4.150.0140.00316.50
7.4.140.0050.01216.45
7.4.130.0130.00816.54
7.4.120.0150.00616.54
7.4.110.0070.01016.59
7.4.100.0080.00816.52
7.4.90.0150.00316.43
7.4.80.0000.02119.39
7.4.70.0130.00316.44
7.4.60.0120.00416.59
7.4.50.0100.00016.62
7.4.40.0030.01216.36
7.4.30.0090.00616.55
7.4.00.0070.01014.68
7.3.330.0030.00313.16
7.3.320.0070.00013.29
7.3.310.0000.00716.30
7.3.300.0030.00316.32
7.3.290.0090.00916.27
7.3.280.0120.00616.28
7.3.270.0140.00316.50
7.3.260.0080.01116.14
7.3.250.0050.01416.31
7.3.240.0090.00616.38
7.3.230.0060.01016.47
7.3.210.0080.01216.56
7.3.200.0050.01116.21
7.3.190.0160.00316.46
7.3.180.0130.00616.55
7.3.170.0070.01016.46
7.3.160.0090.00616.38
7.3.120.0000.01415.02
7.2.330.0120.00616.46
7.2.320.0130.01016.50
7.2.310.0030.02016.56
7.2.300.0070.01016.55
7.2.290.0090.00616.40
7.2.60.0060.00916.93
7.2.00.0030.00919.06
7.1.200.0030.01015.70
7.1.100.0030.01018.19
7.1.70.0030.00716.96
7.1.60.0130.00619.40
7.1.50.0060.01516.89
7.1.00.0000.06322.44
7.0.200.0000.00716.81
7.0.140.0070.07021.95
7.0.120.0070.07021.96
7.0.60.0100.08719.81
7.0.50.0030.04717.91
7.0.40.0170.08320.26
7.0.30.0230.07320.16
7.0.20.0370.08020.09
7.0.10.0070.07720.10
7.0.00.0100.08020.25
5.6.280.0070.07020.86
5.6.210.0070.05720.48
5.6.200.0030.04718.29
5.6.190.0030.09020.46
5.6.180.0230.04320.52
5.6.170.0230.06720.40
5.6.160.0170.06720.51
5.6.150.0030.05318.21
5.6.140.0100.07718.15
5.6.130.0100.07718.28
5.6.120.0130.06321.02
5.6.110.0130.07721.05
5.6.100.0100.08320.96
5.6.90.0170.07720.99
5.6.80.0100.07720.52
5.5.350.3200.03320.33
5.5.340.0030.04018.09
5.5.330.0070.07020.21
5.5.320.0230.08020.34
5.5.310.0330.06720.34
5.5.300.0030.08317.96
5.5.290.0100.08318.10
5.5.280.0100.07320.81
5.5.270.0030.08720.68
5.5.260.0230.06720.77
5.5.250.0070.08020.59
5.5.240.0170.08020.24
5.4.450.3270.03719.41
5.4.440.2970.03719.64
5.4.430.3470.04019.38
5.4.420.3570.03719.38
5.4.410.3370.03019.18
5.4.400.3900.04019.20
5.4.390.3230.04319.16
5.4.380.3100.04019.20
5.4.370.3500.03319.05
5.4.360.3100.03719.16
5.4.350.4000.03319.20
5.4.340.3300.03719.06
5.4.320.3400.04718.95
5.4.310.3530.05019.17
5.4.300.3130.03719.14
5.4.290.3500.04019.13
5.4.280.3630.04019.14
5.4.270.3830.03319.19
5.4.260.3930.03019.16
5.4.250.3730.03719.00
5.4.240.3700.03319.21
5.4.230.3770.03019.14
5.4.220.5100.03319.14
5.4.210.3930.04019.21
5.4.200.3230.04019.15
5.4.190.3230.03719.00
5.4.180.3770.04719.07
5.4.170.3700.03319.12
5.4.160.3430.03718.84
5.4.150.4100.03719.13
5.4.140.3670.02716.52
5.4.130.3370.03316.40
5.4.120.3370.03316.39
5.4.110.3200.03716.63
5.4.100.3130.03316.31
5.4.90.3270.03316.50
5.4.80.3630.03316.31
5.4.70.4800.03316.57
5.4.60.3830.03716.56
5.4.50.3470.03016.51
5.4.40.3600.03016.42
5.4.30.3370.04016.51
5.4.20.3370.03316.34
5.4.10.3570.02716.32
5.4.00.3170.03315.94
5.3.290.3430.03314.75
5.3.280.4870.04314.54
5.3.270.3330.04014.66
5.3.260.3470.03714.50
5.3.250.4100.03014.61
5.3.240.3530.04314.68
5.3.230.3230.04014.75
5.3.220.3630.04314.48
5.3.210.3130.03014.57
5.3.200.3200.03714.58
5.3.190.3430.03714.54
5.3.180.3930.02714.61
5.3.170.4070.03314.46
5.3.160.3330.03014.58
5.3.150.3530.04014.56
5.3.140.3370.03314.62
5.3.130.3530.04314.66
5.3.120.3370.03714.55
5.3.110.3470.04314.52
5.3.100.3030.04314.25
5.3.90.3200.03313.94
5.3.80.3300.03014.11
5.3.70.3370.04014.07
5.3.60.3030.04014.00
5.3.50.3430.03714.19
5.3.40.3170.03314.18
5.3.30.3230.05014.09
5.3.20.3100.03713.62
5.3.10.3500.05313.81
5.3.00.3270.02713.73
5.2.170.2970.03711.40
5.2.160.3070.03011.40
5.2.150.2430.02711.40
5.2.140.2330.03011.40
5.2.130.2900.02311.40
5.2.120.2600.03311.40
5.2.110.2630.02711.40
5.2.100.2670.03011.40
5.2.90.2800.03311.40
5.2.80.2300.03311.40
5.2.70.2630.02711.40
5.2.60.2600.03011.40
5.2.50.2700.02311.40
5.2.40.2130.02711.40
5.2.30.2370.02711.40
5.2.20.2070.02711.40
5.2.10.2130.02011.40
5.2.00.2300.02711.40
5.1.60.2130.02311.40
5.1.50.2430.02011.40
5.1.40.2430.02011.40
5.1.30.2330.02311.40
5.1.20.2330.02711.40
5.1.10.2130.02311.40
5.1.00.2800.03011.40
5.0.50.1300.02711.40
5.0.40.1030.02011.40
5.0.30.1200.03011.40
5.0.20.1300.02711.40
5.0.10.1170.02311.40
5.0.00.1330.03311.40
4.4.90.1270.01711.40
4.4.80.1030.01311.40
4.4.70.1300.01711.40
4.4.60.1030.01311.40
4.4.50.1000.01711.40
4.4.40.1400.03011.40
4.4.30.1370.02311.40
4.4.20.1000.02011.40
4.4.10.1370.01711.40
4.4.00.1370.02011.40
4.3.110.1400.02011.40
4.3.100.1270.01011.40
4.3.90.1400.02011.40
4.3.80.1430.02311.40
4.3.70.1370.01311.40
4.3.60.1100.01311.40
4.3.50.1070.01311.40
4.3.40.1300.03011.40
4.3.30.0700.02311.40
4.3.20.0670.01711.40
4.3.10.0770.02311.40
4.3.00.0700.02011.40

preferences:
61.54 ms | 400 KiB | 5 Q