3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { private $f; public function __construct(&$f) { $this->f = &$f; } public function __destruct() { $this->f = function() {"Echo smart ass!\n";}; } } $f = function () use (&$f) { $t = new test($f); print "After this line it the Closure should be destroyed...\n"; }; $f(); $f(); var_dump($f);

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.0150.00418.30
8.3.50.0130.00722.05
8.3.40.0090.00618.89
8.3.30.0070.00719.24
8.3.20.0040.00420.16
8.3.10.0040.00421.95
8.3.00.0040.00422.58
8.2.180.0070.01416.63
8.2.170.0070.00722.96
8.2.160.0100.00720.93
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00317.50
8.2.110.0040.00420.52
8.2.100.0090.00317.84
8.2.90.0030.00619.05
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0000.00818.04
8.2.50.0000.00818.07
8.2.40.0000.00818.16
8.2.30.0000.00818.07
8.2.20.0070.00017.70
8.2.10.0000.00817.57
8.2.00.0070.00017.69
8.1.280.0130.00725.92
8.1.270.0050.00322.03
8.1.260.0030.00326.35
8.1.250.0080.00028.09
8.1.240.0090.00023.82
8.1.230.0040.00818.97
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0050.00517.23
8.1.190.0090.00017.54
8.1.180.0040.00418.10
8.1.170.0040.00418.53
8.1.160.0040.00421.95
8.1.150.0000.00918.64
8.1.140.0000.00817.50
8.1.130.0050.00317.80
8.1.120.0050.00317.50
8.1.110.0040.00417.52
8.1.100.0000.00717.36
8.1.90.0070.00017.46
8.1.80.0070.00017.37
8.1.70.0030.00317.45
8.1.60.0030.00617.53
8.1.50.0030.00517.43
8.1.40.0080.00017.49
8.1.30.0040.00417.58
8.1.20.0080.00017.55
8.1.10.0000.00717.57
8.1.00.0040.00417.52
8.0.300.0000.00718.77
8.0.290.0070.00017.04
8.0.280.0070.00018.38
8.0.270.0070.00017.22
8.0.260.0030.00318.52
8.0.250.0000.01016.99
8.0.240.0030.00317.01
8.0.230.0030.00316.90
8.0.220.0000.00716.95
8.0.210.0030.00316.81
8.0.200.0000.00616.94
8.0.190.0030.00316.84
8.0.180.0000.00716.96
8.0.170.0000.00916.97
8.0.160.0000.00716.95
8.0.150.0030.00516.92
8.0.140.0040.00416.90
8.0.130.0000.00613.37
8.0.120.0040.00416.89
8.0.110.0030.00616.81
8.0.100.0000.00716.70
8.0.90.0000.00716.71
8.0.80.0060.00916.79
8.0.70.0040.00416.89
8.0.60.0070.00016.77
8.0.50.0070.00017.00
8.0.30.0120.00917.08
8.0.20.0120.00917.40
8.0.10.0040.00416.91
8.0.00.0080.01116.93
7.4.330.0020.00215.14
7.4.320.0090.00016.64
7.4.300.0000.00616.46
7.4.290.0030.00316.47
7.4.280.0000.00716.41
7.4.270.0000.00716.42
7.4.260.0030.00616.40
7.4.250.0000.00816.48
7.4.240.0060.00216.48
7.4.230.0030.00316.36
7.4.220.0100.01016.57
7.4.210.0080.00716.60
7.4.200.0040.00416.71
7.4.190.0000.00716.47
7.4.160.0180.00416.50
7.4.150.0080.00817.40
7.4.140.0100.00817.86
7.4.130.0080.01316.58
7.4.120.0100.00816.61
7.4.110.0070.01116.62
7.4.100.0120.00616.41
7.4.90.0060.01216.71
7.4.80.0140.00719.39
7.4.70.0030.01316.60
7.4.60.0090.00616.54
7.4.50.0000.00716.38
7.4.40.0090.00022.77
7.4.30.0130.00416.57
7.4.00.0030.01514.71
7.3.330.0030.00313.32
7.3.320.0030.00313.21
7.3.310.0030.00316.13
7.3.300.0060.00016.14
7.3.290.0090.00916.28
7.3.280.0090.00716.26
7.3.270.0100.01017.40
7.3.260.0120.00516.48
7.3.250.0140.00716.29
7.3.240.0130.01216.58
7.3.230.0090.01416.59
7.3.210.0110.00516.30
7.3.200.0030.01416.19
7.3.190.0070.01016.48
7.3.180.0100.00716.61
7.3.170.0060.01216.42
7.3.160.0100.00516.53
7.3.120.0000.01414.99
7.3.10.0140.00316.23
7.3.00.0080.00016.43
7.2.330.0080.00816.91
7.2.320.0100.01316.84
7.2.310.0130.01116.75
7.2.300.0090.00916.76
7.2.290.0060.01016.84
7.2.130.0160.01316.49
7.2.120.0060.01216.72
7.2.110.0100.01016.79
7.2.100.0060.00616.58
7.2.90.0140.01016.76
7.2.80.0120.00616.57
7.2.70.0080.01116.64
7.2.60.0180.00316.76
7.2.50.0160.01016.61
7.2.40.0120.01216.48
7.2.30.0110.01216.62
7.2.20.0210.00616.63
7.2.10.0170.01016.40
7.2.00.0060.01318.13
7.1.250.0060.00615.52
7.1.200.0150.00915.29
7.1.100.0030.00918.07
7.1.70.0040.01216.86
7.1.60.0040.01119.82
7.1.50.0070.01416.70
7.1.00.0100.07022.51
7.0.200.0000.00716.89
7.0.140.0070.07022.09
7.0.60.0070.09019.91
7.0.50.0000.05717.87
7.0.40.0000.07320.22
7.0.30.0070.05720.32
7.0.20.0370.05020.07
7.0.10.0030.06020.24
7.0.00.0000.08720.29
5.6.280.0030.07020.87
5.6.210.0070.08320.48
5.6.200.0170.07318.29
5.6.190.0100.08320.42
5.6.180.0230.04020.67
5.6.170.0300.04720.44
5.6.160.0000.04320.57
5.6.150.0070.07718.15
5.6.140.0030.03718.15
5.6.130.0130.08018.19
5.6.120.0070.07020.99
5.6.110.0130.08321.00
5.6.100.0170.07320.89
5.6.90.0070.08320.97
5.6.80.0130.07720.38
5.5.350.0030.08720.38
5.5.340.0130.03717.96
5.5.330.0000.04320.43
5.5.320.0300.07320.35
5.5.310.0270.07720.34
5.5.300.0200.06717.95
5.5.290.0070.04718.01
5.5.280.0070.04320.99
5.5.270.0100.08320.80
5.5.260.0030.06320.89
5.5.250.0170.07020.59
5.5.240.0000.05020.27
5.4.450.2970.03719.28
5.4.440.3400.03319.30
5.4.430.2970.04019.41
5.4.420.3200.03319.16
5.4.410.3100.04019.09
5.4.400.2400.04319.20
5.4.390.2970.03719.31
5.4.380.2800.03719.09
5.4.370.3030.03719.15
5.4.360.3000.03319.20
5.4.350.2670.04018.95
5.4.340.2670.03719.06
5.4.320.3170.04019.13
5.4.310.2730.04019.24
5.4.300.2700.03319.16
5.4.290.2830.03319.14
5.4.280.2700.04019.19
5.4.270.3130.03319.15
5.4.260.2500.04718.95
5.4.250.2730.03719.15
5.4.240.3130.04319.25
5.4.230.3070.04319.08
5.4.220.2900.04718.97
5.4.210.2870.03719.30
5.4.200.3000.03719.05
5.4.190.3200.03719.15
5.4.180.2770.04019.21
5.4.170.3300.03318.83
5.4.160.3300.03318.96
5.4.150.2770.03019.18
5.4.140.3300.03016.72
5.4.130.3130.03316.71
5.4.120.2930.04016.54
5.4.110.2930.04316.24
5.4.100.2830.03716.42
5.4.90.2530.03016.25
5.4.80.3230.03716.31
5.4.70.3600.03016.40
5.4.60.1930.03716.54
5.4.50.3000.03316.23
5.4.40.2470.03716.43
5.4.30.2630.03316.55
5.4.20.3030.03316.53
5.4.10.3030.03316.42
5.4.00.2570.03015.78
5.3.290.2530.03714.59
5.3.280.2530.03714.50
5.3.270.2270.03314.61
5.3.260.2770.04014.52
5.3.250.2800.03314.54
5.3.240.2470.04014.54
5.3.230.3070.03314.63
5.3.220.3000.04014.72
5.3.210.2970.04014.80
5.3.200.2730.04014.56
5.3.190.3230.03314.80
5.3.180.2670.03714.62
5.3.170.2430.04014.82
5.3.160.3000.04014.73
5.3.150.2970.04014.72
5.3.140.3170.04014.57
5.3.130.3230.03314.67
5.3.120.3170.03714.56
5.3.110.2670.05014.61
5.3.100.3400.04314.15
5.3.90.2730.03714.00
5.3.80.2670.04013.95
5.3.70.2500.03314.03
5.3.60.3270.04014.23
5.3.50.2630.04313.97
5.3.40.3230.03713.96
5.3.30.2700.03313.94
5.3.20.3370.03713.72
5.3.10.3130.03313.52
5.3.00.2970.03313.56
5.2.170.2470.03311.08
5.2.160.2470.02711.06
5.2.150.2700.03011.06
5.2.140.2700.02711.07
5.2.130.2770.03011.18
5.2.120.2100.03011.02
5.2.110.2200.03311.02
5.2.100.2500.03011.20
5.2.90.2730.03011.18
5.2.80.2430.03011.12
5.2.70.2730.02311.02
5.2.60.2470.03011.20
5.2.50.2570.02311.02
5.2.40.1730.03010.90
5.2.30.2070.02310.89
5.2.20.1930.03310.89
5.2.10.1500.02710.89
5.2.00.1470.03010.89
5.1.60.2200.02710.89
5.1.50.2300.02710.89
5.1.40.1200.03010.89
5.1.30.1900.03310.89
5.1.20.2270.02710.89
5.1.10.2270.02310.89
5.1.00.1700.02710.89
5.0.50.1300.02310.89
5.0.40.1270.01710.89
5.0.30.1300.03010.89
5.0.20.1100.02010.89
5.0.10.0830.01310.89
5.0.00.0730.03010.89
4.4.90.1230.02010.89
4.4.80.0970.02010.89
4.4.70.1230.02310.89
4.4.60.1200.01710.89
4.4.50.0870.02010.89
4.4.40.0600.03710.89
4.4.30.1000.01710.89
4.4.20.1070.02010.89
4.4.10.1230.02010.89
4.4.00.1000.03010.89
4.3.110.1230.01710.89
4.3.100.0230.03010.89
4.3.90.0970.01310.89
4.3.80.1170.02310.89
4.3.70.1230.02010.89
4.3.60.1130.02010.89
4.3.50.1230.02010.89
4.3.40.1130.02310.89
4.3.30.0000.01710.89
4.3.20.0700.02710.89
4.3.10.0530.01710.89
4.3.00.0570.02310.89

preferences:
40.4 ms | 401 KiB | 5 Q