3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bar; public function __construct() { $this->bar = new Bar('bar'); } public function getBarData() { return $this->bar->getData(); } public function __destruct() { echo __METHOD__; } } class Bar { protected $data; public function __construct($data) { $this->data = $data; } public function getData() { return $this->data; } public function __destruct() { echo __METHOD__; } } $foo = new Foo; echo $foo->getBarData(); unset($foo);

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.40.0140.00018.81
8.3.30.0070.01018.78
8.3.20.0000.00818.65
8.3.10.0040.00421.00
8.3.00.0080.00019.79
8.2.170.0120.00322.96
8.2.160.0000.01320.53
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00421.06
8.2.110.0090.00020.48
8.2.100.0040.00717.72
8.2.90.0000.00819.25
8.2.80.0030.00619.28
8.2.70.0030.00517.63
8.2.60.0060.00317.93
8.2.50.0030.00618.07
8.2.40.0030.00518.16
8.2.30.0080.00021.26
8.2.20.0070.00017.66
8.2.10.0050.00317.61
8.2.00.0000.00817.63
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00622.42
8.1.230.0030.00920.90
8.1.220.0080.00018.77
8.1.210.0030.00620.74
8.1.200.0080.00317.22
8.1.190.0040.00417.51
8.1.180.0050.00318.10
8.1.170.0060.00318.25
8.1.160.0070.00018.83
8.1.150.0000.01018.58
8.1.140.0040.00417.41
8.1.130.0040.00417.90
8.1.120.0040.00417.40
8.1.110.0080.00417.38
8.1.100.0050.00317.30
8.1.90.0000.00717.40
8.1.80.0040.00417.30
8.1.70.0050.00317.41
8.1.60.0050.00517.64
8.1.50.0000.00717.36
8.1.40.0070.00017.54
8.1.30.0030.00517.61
8.1.20.0000.00817.72
8.1.10.0030.00517.52
8.1.00.0050.00217.53
8.0.300.0070.00419.89
8.0.290.0040.00416.93
8.0.280.0060.00318.44
8.0.270.0030.00417.31
8.0.260.0000.00716.70
8.0.250.0000.00816.84
8.0.240.0040.00416.94
8.0.230.0040.00416.99
8.0.220.0030.00316.83
8.0.210.0040.00416.80
8.0.200.0030.00316.77
8.0.190.0070.00016.88
8.0.180.0000.00716.88
8.0.170.0000.00716.86
8.0.160.0030.00316.77
8.0.150.0030.00416.80
8.0.140.0030.00516.79
8.0.130.0000.00513.27
8.0.120.0060.00316.81
8.0.110.0020.00516.90
8.0.100.0050.00316.68
8.0.90.0040.00416.90
8.0.80.0100.00716.83
8.0.70.0040.00416.71
8.0.60.0040.00416.84
8.0.50.0070.00016.65
8.0.30.0100.01517.12
8.0.20.0120.00617.40
8.0.10.0000.00716.91
8.0.00.0090.00916.90
7.4.330.0030.00316.82
7.4.320.0000.00616.44
7.4.300.0030.00316.48
7.4.290.0030.00316.54
7.4.280.0030.00316.51
7.4.270.0000.00716.60
7.4.260.0000.00613.27
7.4.250.0000.00816.34
7.4.240.0000.00716.54
7.4.230.0080.00016.67
7.4.220.0090.01016.57
7.4.210.0080.00716.56
7.4.200.0000.00716.52
7.4.190.0040.00416.70
7.4.160.0110.00616.70
7.4.150.0140.00317.40
7.4.140.0040.01317.86
7.4.130.0090.00916.31
7.4.120.0090.00916.50
7.4.110.0040.01816.52
7.4.100.0120.00416.51
7.4.90.0120.01216.42
7.4.80.0070.01019.39
7.4.70.0110.00616.63
7.4.60.0100.00816.57
7.4.50.0000.00916.09
7.4.40.0070.01022.77
7.4.30.0070.01116.47
7.4.00.0080.00415.12
7.3.330.0000.00613.23
7.3.320.0050.00313.10
7.3.310.0030.00316.15
7.3.300.0030.00316.34
7.3.290.0040.01116.21
7.3.280.0080.00916.32
7.3.270.0100.01017.40
7.3.260.0120.00818.24
7.3.250.0070.01116.41
7.3.240.0150.00616.27
7.3.230.0090.00916.39
7.3.210.0180.00016.32
7.3.200.0140.00319.39
7.3.190.0140.00316.49
7.3.180.0080.00816.25
7.3.170.0120.00316.27
7.3.160.0060.00916.43
7.3.120.0140.00314.54
7.3.10.0040.00816.61
7.3.00.0000.01216.56
7.2.330.0130.01316.68
7.2.320.0040.01816.50
7.2.310.0090.01216.71
7.2.300.0110.00516.36
7.2.290.0030.01316.69
7.2.130.0030.01217.09
7.2.120.0110.00016.99
7.2.110.0080.00416.77
7.2.100.0040.00716.98
7.2.90.0030.00917.00
7.2.80.0040.00716.98
7.2.70.0090.00317.13
7.2.60.0070.00716.93
7.2.50.0110.00016.95
7.2.40.0070.00717.05
7.2.30.0030.00716.94
7.2.20.0120.00016.74
7.2.10.0050.00516.95
7.2.00.0020.01218.12
7.1.250.0030.01015.50
7.1.100.0070.00718.35
7.1.70.0000.00817.13
7.1.60.0070.00719.24
7.1.50.0090.00316.73
7.1.00.0000.03722.57
7.0.200.0060.00316.79
7.0.140.0030.07021.99
7.0.60.0330.07021.84
7.0.50.0070.05317.87
7.0.40.0100.04720.02
7.0.30.0400.06320.06
7.0.20.0300.03720.21
7.0.10.0100.08320.30
7.0.00.0100.05320.10
5.6.280.0130.06020.79
5.6.210.0030.07720.56
5.6.200.0070.08018.18
5.6.190.0130.07020.46
5.6.180.0170.07320.47
5.6.170.0300.03720.71
5.6.160.0070.07320.71
5.6.150.0070.03718.18
5.6.140.0100.07318.15
5.6.130.0070.05318.19
5.6.120.0170.08321.11
5.6.110.0030.04021.02
5.6.100.0070.04720.98
5.6.90.0070.08320.93
5.6.80.0030.07320.45
5.5.350.0330.06720.45
5.5.340.0130.07018.09
5.5.330.0100.05020.20
5.5.320.0200.04020.36
5.5.310.0300.08020.36
5.5.300.0030.04017.99
5.5.290.0030.04317.95
5.5.280.0100.03720.99
5.5.270.0070.08720.78
5.5.260.0200.07320.91
5.5.250.0170.04020.52
5.5.240.0200.06320.09
5.4.450.3830.04319.25
5.4.440.3930.04019.54
5.4.430.3000.04019.29
5.4.420.3630.03319.29
5.4.410.4100.04319.32
5.4.400.3930.03719.18
5.4.390.3800.03718.96
5.4.380.3900.04318.93
5.4.370.3870.04019.14
5.4.360.3600.03719.10
5.4.350.4030.03319.13
5.4.340.3770.04018.95
5.4.320.3870.03718.97
5.4.310.4630.03718.93
5.4.300.4270.03718.96
5.4.290.4600.03319.15
5.4.280.4630.04019.16
5.4.270.4600.04319.10
5.4.260.4400.03319.22
5.4.250.4270.03719.03
5.4.240.3730.03319.03
5.4.230.3900.03719.03
5.4.220.4070.04319.18
5.4.210.3670.03719.05
5.4.200.3670.03719.18
5.4.190.3630.03719.23
5.4.180.3630.03319.13
5.4.170.3870.03318.96
5.4.160.4630.04019.01
5.4.150.4900.04319.16
5.4.140.3930.03316.50
5.4.130.4170.04016.49
5.4.120.3930.03316.39
5.4.110.4000.03316.50
5.4.100.4270.03316.68
5.4.90.4400.04016.56
5.4.80.4700.03316.24
5.4.70.0070.07016.59
5.4.60.0100.07316.24
5.4.50.4400.03316.45
5.4.40.4630.03716.46
5.4.30.3730.03316.36
5.4.20.3770.02316.47
5.4.10.4000.03716.45
5.4.00.3930.03315.79
5.3.290.4530.04014.71
5.3.280.3830.03014.61
5.3.270.4130.03714.66
5.3.260.4500.04014.62
5.3.250.4130.03714.76
5.3.240.4030.04714.62
5.3.230.4000.04014.53
5.3.220.4200.03314.50
5.3.210.4400.02714.63
5.3.200.4200.03314.64
5.3.190.4500.04314.46
5.3.180.4600.03714.62
5.3.170.3800.04014.58
5.3.160.0000.05714.59
5.3.150.2970.03714.73
5.3.140.4670.03714.57
5.3.130.3930.04014.61
5.3.120.3530.04314.56
5.3.110.3630.04314.56
5.3.100.3900.04014.10
5.3.90.4000.03014.04
5.3.80.4670.04314.02
5.3.70.4530.04013.93
5.3.60.4630.03314.01
5.3.50.4530.03714.10
5.3.40.0030.07714.00
5.3.30.0100.07313.92
5.3.20.4000.03313.70
5.3.10.4330.04013.71
5.3.00.3830.03713.73
5.2.170.4000.03311.08
5.2.160.2530.02711.15
5.2.150.0070.05011.20
5.2.140.1700.05311.04
5.2.130.3670.02311.11
5.2.120.3970.02711.11
5.2.110.3970.02311.16
5.2.100.2930.03311.07
5.2.90.3830.03311.15
5.2.80.4000.02011.14
5.2.70.3870.02311.18
5.2.60.3900.03011.11
5.2.50.3370.03011.07
5.2.40.3030.03710.96
5.2.30.3300.03710.97
5.2.20.2700.03310.97
5.2.10.2900.03010.87
5.2.00.2930.02710.80
5.1.60.3230.0279.96
5.1.50.2900.02310.06
5.1.40.3230.0279.94
5.1.30.2930.02310.39
5.1.20.3200.02710.43
5.1.10.2830.02010.09
5.1.00.3030.03010.09
5.0.50.1800.0238.54
5.0.40.1470.0208.38
5.0.30.1700.0338.19
5.0.20.1670.0138.26
5.0.10.1600.0238.16
5.0.00.1570.0308.07
4.4.90.1470.0135.86
4.4.80.1630.0175.88
4.4.70.1670.0135.85
4.4.60.1770.0175.88
4.4.50.1830.0175.93
4.4.40.1700.0275.80
4.4.30.1730.0135.76
4.4.20.1830.0135.90
4.4.10.1770.0175.86
4.4.00.1730.0205.85
4.3.110.1930.0135.70
4.3.100.1530.0175.82
4.3.90.1700.0175.73
4.3.80.1630.0305.76
4.3.70.1500.0175.77
4.3.60.1300.0175.78
4.3.50.1500.0175.67
4.3.40.1800.0205.64
4.3.30.0800.0205.52
4.3.20.0930.0235.52
4.3.10.0970.0205.52
4.3.00.0730.0175.52

preferences:
41.13 ms | 400 KiB | 5 Q