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.70.0170.00016.50
8.3.60.0110.00718.30
8.3.50.0060.01222.11
8.3.40.0090.00618.88
8.3.30.0070.00719.21
8.3.20.0070.00020.36
8.3.10.0040.00422.09
8.3.00.0040.00422.43
8.2.190.0140.00016.58
8.2.180.0070.01016.49
8.2.170.0060.00922.96
8.2.160.0110.00720.99
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.36
8.2.110.0100.00720.39
8.2.100.0090.00317.76
8.2.90.0040.00419.21
8.2.80.0060.00317.97
8.2.70.0030.00517.50
8.2.60.0000.00818.05
8.2.50.0030.00618.07
8.2.40.0000.00718.08
8.2.30.0030.00618.13
8.2.20.0030.00517.54
8.2.10.0040.00417.60
8.2.00.0040.00417.57
8.1.280.0090.01225.92
8.1.270.0000.00722.18
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0090.00020.91
8.1.230.0040.00717.83
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0080.00017.25
8.1.190.0090.00017.54
8.1.180.0040.00718.10
8.1.170.0000.00818.46
8.1.160.0000.00722.07
8.1.150.0040.00418.56
8.1.140.0000.00717.34
8.1.130.0050.00217.46
8.1.120.0000.00717.53
8.1.110.0000.00917.40
8.1.100.0030.00517.38
8.1.90.0040.00417.36
8.1.80.0070.00017.44
8.1.70.0070.00017.40
8.1.60.0000.00817.59
8.1.50.0020.00517.56
8.1.40.0040.00417.42
8.1.30.0020.00517.61
8.1.20.0030.00517.69
8.1.10.0000.00717.65
8.1.00.0040.00417.57
8.0.300.0000.00718.78
8.0.290.0040.00416.75
8.0.280.0070.00018.42
8.0.270.0030.00517.27
8.0.260.0030.00316.70
8.0.250.0000.00716.84
8.0.240.0050.00316.90
8.0.230.0070.00016.99
8.0.220.0030.00316.99
8.0.210.0000.00716.95
8.0.200.0030.00316.87
8.0.190.0030.00316.84
8.0.180.0040.00416.99
8.0.170.0040.00416.84
8.0.160.0080.00016.80
8.0.150.0000.01116.89
8.0.140.0040.00416.85
8.0.130.0000.00713.35
8.0.120.0030.00516.78
8.0.110.0060.00316.96
8.0.100.0040.00416.80
8.0.90.0000.00816.95
8.0.80.0110.00416.82
8.0.70.0040.00416.79
8.0.60.0080.00016.79
8.0.50.0000.00816.88
8.0.30.0160.00617.14
8.0.20.0060.01217.40
8.0.10.0040.00416.84
8.0.00.0080.01016.80
7.4.330.0050.00015.00
7.4.320.0070.00016.54
7.4.300.0070.00016.59
7.4.290.0000.00716.64
7.4.280.0030.00316.45
7.4.270.0030.00316.52
7.4.260.0000.00716.46
7.4.250.0060.00316.57
7.4.240.0050.00216.58
7.4.230.0000.00716.70
7.4.220.0190.00616.68
7.4.210.0060.00916.53
7.4.200.0000.00716.59
7.4.190.0080.00016.40
7.4.160.0190.00616.38
7.4.150.0130.00317.40
7.4.140.0120.00817.86
7.4.130.0100.00816.48
7.4.120.0080.01016.61
7.4.110.0120.00916.53
7.4.100.0130.00616.70
7.4.90.0120.00916.52
7.4.80.0110.01019.39
7.4.70.0080.00916.53
7.4.60.0140.00416.37
7.4.50.0040.00416.47
7.4.40.0080.00822.77
7.4.30.0180.00316.60
7.4.00.0110.00415.04
7.3.330.0000.00513.30
7.3.320.0000.00613.25
7.3.310.0000.00716.17
7.3.300.0030.00516.36
7.3.290.0070.00716.24
7.3.280.0090.00816.30
7.3.270.0090.00917.40
7.3.260.0110.00916.21
7.3.250.0060.01116.34
7.3.240.0070.01016.43
7.3.230.0110.00516.58
7.3.210.0080.00816.38
7.3.200.0110.00619.39
7.3.190.0100.01316.38
7.3.180.0100.00616.30
7.3.170.0140.00316.50
7.3.160.0100.00716.45
7.3.120.0140.00414.74
7.3.110.0030.01515.08
7.3.100.0100.00614.61
7.3.90.0060.00615.10
7.3.80.0040.00714.93
7.3.70.0000.01114.67
7.3.60.0030.01014.95
7.3.50.0070.00714.82
7.3.40.0070.00714.82
7.3.30.0030.00914.81
7.3.20.0030.01316.66
7.3.10.0060.00316.66
7.3.00.0090.00616.63
7.2.330.0120.00616.51
7.2.320.0070.01316.49
7.2.310.0110.01116.86
7.2.300.0140.00416.75
7.2.290.0080.01416.57
7.2.250.0130.00715.22
7.2.240.0030.01615.26
7.2.230.0040.00815.11
7.2.220.0120.00014.88
7.2.210.0090.00614.73
7.2.200.0080.00415.25
7.2.190.0060.01015.25
7.2.180.0030.00715.12
7.2.170.0130.00315.21
7.2.00.0030.01019.26
7.1.330.0030.01015.86
7.1.320.0040.01215.49
7.1.310.0090.00615.61
7.1.300.0040.00815.95
7.1.290.0060.00615.46
7.1.280.0090.00315.84
7.1.270.0060.00615.96
7.1.260.0070.00715.55
7.1.100.0000.00818.40
7.1.70.0000.00817.22
7.1.60.0130.01319.82
7.1.50.0060.01616.79
7.1.00.0030.07322.54
7.0.200.0050.00216.46
7.0.140.0070.06721.97
7.0.60.0200.07319.80
7.0.50.0070.07717.72
7.0.40.0200.07720.02
7.0.30.0300.07020.38
7.0.20.0130.04720.19
7.0.10.0200.04020.30
7.0.00.0100.08720.05
5.6.280.0130.06321.13
5.6.210.0030.05720.76
5.6.200.0070.06718.25
5.6.190.0000.07020.67
5.6.180.3430.03720.57
5.6.170.0200.08320.52
5.6.160.0070.06720.61
5.6.150.0100.08018.15
5.6.140.0000.05318.23
5.6.130.0030.08318.29
5.6.120.0100.08320.97
5.6.110.0200.07321.00
5.6.100.0200.07321.10
5.6.90.0130.08021.14
5.6.80.0070.05020.52
5.6.70.0300.07020.41
5.5.350.0030.07720.41
5.5.340.0000.04017.93
5.5.330.0170.07320.27
5.5.320.0230.03720.38
5.5.310.0200.04320.38
5.5.300.0070.05717.98
5.5.290.0070.04717.97
5.5.280.0100.03720.86
5.5.270.0100.08020.68
5.5.260.0070.05720.89
5.5.250.0270.06320.59
5.5.240.0070.04720.20
5.4.450.0230.07319.48
5.4.440.0230.04319.48
5.4.430.0230.07319.47
5.4.420.0200.04719.41
5.4.410.0230.07319.14
5.4.400.0170.07319.32
5.4.390.0200.05319.15
5.4.380.0170.04018.88
5.4.370.0170.05318.95
5.4.360.0200.07319.31
5.4.350.0200.04018.95
5.4.340.0230.07319.22
5.4.320.0300.06319.09
5.4.310.0170.05319.09
5.4.300.0170.06718.99
5.4.290.0230.07318.98
5.4.280.0230.06719.13
5.4.270.0230.03319.08
5.4.260.0170.04718.86
5.4.250.0270.03318.98
5.4.240.0170.08018.98
5.4.230.0300.05719.08
5.4.220.0200.06018.87
5.4.210.0200.04018.94
5.4.200.0270.04319.30
5.4.190.0300.03019.21
5.4.180.0300.06719.07
5.4.170.0200.04319.23
5.4.160.0200.08019.20
5.4.150.0230.07718.96
5.4.140.0300.06016.44
5.4.130.0230.06716.43
5.4.120.0130.05316.50
5.4.110.0270.04716.59
5.4.100.0300.06716.40
5.4.90.0270.04316.33
5.4.80.0170.03716.29
5.4.70.0270.04016.57
5.4.60.0230.04716.16
5.4.50.0230.03716.34
5.4.40.0200.06716.51
5.4.30.0300.06316.53
5.4.20.0270.04316.51
5.4.10.0200.07316.32
5.4.00.0170.04315.80
5.3.290.0300.07014.72
5.3.280.0200.04014.61
5.3.270.0230.05314.52
5.3.260.0300.04314.52
5.3.250.0200.06714.54
5.3.240.0300.06014.69
5.3.230.0230.07714.53
5.3.220.0230.03714.73
5.3.210.0200.06314.73
5.3.200.0230.04314.47
5.3.190.0300.04014.48
5.3.180.0270.07014.75
5.3.170.0270.04314.56
5.3.160.0200.07314.79
5.3.150.0200.05014.64
5.3.140.0230.07314.61
5.3.130.0200.05314.48
5.3.120.0170.06314.56
5.3.110.0270.07014.64
5.3.100.0300.06014.12
5.3.90.0270.04714.18
5.3.80.0230.04014.05
5.3.70.0270.03714.15
5.3.60.0200.06714.11
5.3.50.0230.05014.05
5.3.40.0230.03313.98
5.3.30.0300.02313.93
5.3.20.0230.06013.82
5.3.10.0230.06713.66
5.3.00.0270.06013.81
5.2.170.0200.06311.95
5.2.160.0170.04011.95
5.2.150.0270.05711.95
5.2.140.0130.05311.95
5.2.130.0170.06711.95
5.2.120.0270.04011.95
5.2.110.0200.03311.95
5.2.100.0230.04311.95
5.2.90.0270.05311.95
5.2.80.0200.05711.95
5.2.70.0230.04711.95
5.2.60.0270.05311.95
5.2.50.0200.05011.95
5.2.40.0130.03311.95
5.2.30.0130.04311.95
5.2.20.0170.04711.95
5.2.10.0270.05011.95
5.2.00.0170.05711.95
5.1.60.0170.05011.95
5.1.50.0130.05311.95
5.1.40.0130.05311.95
5.1.30.0170.05711.95
5.1.20.0200.03011.95
5.1.10.0200.03011.95
5.1.00.0130.05311.95
5.0.50.0030.04711.95
5.0.40.0070.04311.95
5.0.30.0100.06311.95
5.0.20.0100.04011.95
5.0.10.0070.02711.95
5.0.00.0100.03311.95
4.4.90.0100.03311.95
4.4.80.0030.02011.95
4.4.70.0100.03311.95
4.4.60.0070.03011.95
4.4.50.0100.03311.95
4.4.40.0100.04011.95
4.4.30.0100.03711.95
4.4.20.0070.02311.95
4.4.10.0030.04011.95
4.4.00.0100.05011.95
4.3.110.0070.02311.95
4.3.100.0070.03711.95
4.3.90.0100.03311.95
4.3.80.0070.03011.95
4.3.70.0100.03311.95
4.3.60.0070.03711.95
4.3.50.0070.03711.95
4.3.40.0100.02711.95
4.3.30.0030.03711.95
4.3.20.0030.04011.95
4.3.10.0070.02311.95
4.3.00.0030.02311.95

preferences:
24.21 ms | 401 KiB | 5 Q