3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function __construct() { $this->b = new B($this); } public function __destruct() { echo 'c destructing!'; } } class B { public function __construct($C){ $this->c = $c; } public function __destruct() { echo 'b destructing!'; } } $c = new C; die();

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.01016.63
8.3.50.0130.00617.30
8.3.40.0040.01118.84
8.3.30.0070.00718.61
8.3.20.0060.00318.91
8.3.10.0040.00418.90
8.3.00.0060.00319.50
8.2.180.0100.01018.29
8.2.170.0140.00722.96
8.2.160.0110.00418.66
8.2.150.0090.00024.18
8.2.140.0090.00924.66
8.2.130.0000.00826.16
8.2.120.0080.00019.66
8.2.110.0030.00619.20
8.2.100.0070.00417.72
8.2.90.0000.00817.73
8.2.80.0000.00818.77
8.2.70.0000.00817.63
8.2.60.0000.00917.63
8.2.50.0030.00617.91
8.2.40.0030.00619.22
8.2.30.0030.00617.69
8.2.20.0030.00917.75
8.2.10.0000.01019.37
8.2.00.0000.00817.63
8.1.280.0140.00025.92
8.1.270.0040.01123.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0110.00020.76
8.1.230.0090.00322.81
8.1.220.0040.00418.45
8.1.210.0030.00518.77
8.1.200.0040.00417.47
8.1.190.0080.00017.35
8.1.180.0040.00418.10
8.1.170.0030.00617.62
8.1.160.0070.00018.89
8.1.150.0070.00018.57
8.1.140.0040.00417.45
8.1.130.0070.00019.05
8.1.120.0070.00017.40
8.1.110.0030.00617.42
8.1.100.0030.00317.38
8.1.90.0000.00717.31
8.1.80.0000.00717.29
8.1.70.0030.00317.29
8.1.60.0060.00317.62
8.1.50.0060.00317.54
8.1.40.0000.00717.56
8.1.30.0070.00417.52
8.1.20.0000.01117.48
8.1.10.0000.00917.57
8.1.00.0000.00717.41
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0060.00018.57
8.0.270.0040.00417.27
8.0.260.0000.00716.90
8.0.250.0000.00716.97
8.0.240.0030.00316.97
8.0.230.0060.00316.93
8.0.220.0050.00216.79
8.0.210.0000.00716.87
8.0.200.0030.00317.02
8.0.190.0040.00416.94
8.0.180.0080.00316.91
8.0.170.0040.00416.96
8.0.160.0080.00316.84
8.0.150.0040.00416.87
8.0.140.0080.00016.92
8.0.130.0070.00013.32
8.0.120.0000.00816.72
8.0.110.0050.00316.96
8.0.100.0000.00716.73
8.0.90.0000.00716.70
8.0.80.0180.00016.90
8.0.70.0040.00416.77
8.0.60.0090.00016.77
8.0.50.0000.00816.95
8.0.30.0140.00317.21
8.0.20.0180.00717.26
8.0.10.0030.00617.01
8.0.00.0130.00516.92
7.4.330.0060.00012.94
7.4.320.0000.00716.54
7.4.300.0060.00016.61
7.4.290.0000.00816.61
7.4.280.0040.00416.49
7.4.270.0100.00016.69
7.4.260.0030.00313.29
7.4.250.0040.00416.57
7.4.240.0000.00716.62
7.4.230.0040.00416.67
7.4.220.0120.01216.45
7.4.210.0100.00616.71
7.4.200.0000.00716.45
7.4.190.0040.00416.79
7.4.160.0040.01116.45
7.4.150.0060.01216.36
7.4.140.0140.01017.86
7.4.130.0190.00616.61
7.4.120.0090.00916.71
7.4.110.0030.02016.45
7.4.100.0080.00816.50
7.4.90.0120.00616.55
7.4.80.0030.01319.39
7.4.70.0130.00316.61
7.4.60.0110.00916.56
7.4.50.0000.00516.22
7.4.40.0060.00916.21
7.4.30.0110.00816.68
7.4.00.0090.00714.91
7.3.330.0030.00313.39
7.3.320.0000.00513.28
7.3.310.0050.00216.39
7.3.300.0030.00316.21
7.3.290.0070.01016.34
7.3.280.0000.01516.27
7.3.270.0120.00616.42
7.3.260.0100.00716.33
7.3.240.0170.00716.35
7.3.230.0110.00616.55
7.3.210.0120.00616.44
7.3.200.0200.00016.40
7.3.190.0040.01216.43
7.3.180.0120.00616.16
7.3.170.0090.00616.48
7.3.160.0160.00016.46
7.3.120.0070.01014.79
7.3.110.0040.01214.78
7.3.100.0050.00814.80
7.3.90.0070.00714.86
7.3.80.0050.01014.75
7.3.70.0070.00514.75
7.3.60.0020.01214.90
7.3.50.0060.00914.83
7.3.40.0080.00514.83
7.3.30.0070.00514.82
7.3.20.0080.00716.66
7.3.10.0050.00916.68
7.3.00.0050.00816.64
7.2.330.0030.01916.66
7.2.320.0110.01116.46
7.2.310.0140.00716.57
7.2.300.0030.01416.43
7.2.290.0100.00716.46
7.2.250.0060.01015.14
7.2.240.0090.01015.05
7.2.230.0050.01015.04
7.2.220.0020.01015.14
7.2.210.0060.00715.04
7.2.200.0080.00415.18
7.2.190.0050.00714.90
7.2.180.0070.00815.10
7.2.170.0070.00515.04
7.2.60.0100.00316.81
7.1.330.0060.00815.70
7.1.320.0060.00715.67
7.1.310.0070.00715.83
7.1.300.0060.00915.76
7.1.290.0070.00715.84
7.1.280.0050.00715.70
7.1.270.0050.00915.78
7.1.260.0060.00715.81
7.1.200.0040.01115.70
7.1.70.0100.00317.20
7.1.60.0090.01519.21
7.1.50.0140.00716.72
7.1.00.0000.04022.48
7.0.200.0240.00716.34
7.0.140.0100.06722.08
7.0.120.0100.03722.13
7.0.60.0030.04720.03
7.0.50.0070.04017.91
7.0.40.0100.08320.16
7.0.30.0230.04020.21
7.0.20.0300.07320.09
7.0.10.0330.07320.16
7.0.00.0030.05320.33
5.6.280.0000.07721.13
5.6.210.0200.06320.73
5.6.200.0130.07318.27
5.6.190.0030.06020.62
5.6.180.0300.08020.49
5.6.170.0300.04320.57
5.6.160.0070.08720.55
5.6.150.0070.07018.15
5.6.140.0030.04018.29
5.6.130.0000.04718.18
5.6.120.0170.07720.99
5.6.110.0100.08020.99
5.6.100.0170.05721.04
5.6.90.0000.04321.00
5.6.80.0000.08720.54
5.6.70.0400.06320.36
5.5.350.0200.07020.33
5.5.340.0070.05317.96
5.5.330.0070.03720.27
5.5.320.0070.08320.36
5.5.310.0230.04720.19
5.5.300.0070.08017.95
5.5.290.0100.03717.95
5.5.280.0130.07320.85
5.5.270.0070.08020.87
5.5.260.0070.05720.80
5.5.250.0070.06320.79
5.5.240.0070.04020.16
5.4.450.0170.04019.53
5.4.440.0000.05019.56
5.4.430.0030.04719.53
5.4.420.0070.05719.18
5.4.410.0070.05019.31
5.4.400.0070.04319.26
5.4.390.0100.08019.00
5.4.380.0100.04018.85
5.4.370.0030.07019.12
5.4.360.0130.04318.88
5.4.350.0070.04019.00
5.4.340.0070.07719.18
5.4.320.0100.04319.14
5.4.310.0000.04018.85
5.4.300.0030.03719.25
5.4.290.0030.04019.20
5.4.280.0070.03318.92
5.4.270.0030.03718.88
5.4.260.0030.03718.92
5.4.250.0070.03319.15
5.4.240.0070.04019.14
5.4.230.0030.03719.15
5.4.220.0030.03719.23
5.4.210.0130.02718.91
5.4.200.0000.04018.91
5.4.190.0030.03719.16
5.4.180.0000.04019.13
5.4.170.0070.03319.23
5.4.160.0030.04019.13
5.4.150.0030.03719.13
5.4.140.0000.03716.60
5.4.130.0030.03316.54
5.4.120.0030.03316.47
5.4.110.0000.04316.58
5.4.100.0030.03316.32
5.4.90.0000.03716.48
5.4.80.0000.03716.45
5.4.70.0070.03016.44
5.4.60.0030.03316.45
5.4.50.0030.04016.34
5.4.40.0030.03716.51
5.4.30.0070.04316.52
5.4.20.0130.06716.50
5.4.10.0100.03716.39
5.4.00.0070.07015.84
5.3.290.0030.03714.73
5.3.280.0000.04014.61
5.3.270.0000.04014.76
5.3.260.0030.04014.63
5.3.250.0000.03714.65
5.3.240.0070.03314.66
5.3.230.0030.03714.67
5.3.220.0100.03014.59
5.3.210.0030.03714.72
5.3.200.0030.03314.49
5.3.190.0200.02714.57
5.3.180.0070.03014.56
5.3.170.0100.03014.64
5.3.160.0100.03014.48
5.3.150.0000.04314.58
5.3.140.0030.03314.71
5.3.130.0030.07014.44
5.3.120.0070.04014.63
5.3.110.0170.04314.56
5.3.100.0100.07014.07
5.3.90.0030.05714.08
5.3.80.0100.07314.18
5.3.70.0070.03713.91
5.3.60.0000.05014.17
5.3.50.0000.04313.84
5.3.40.0000.06313.98
5.3.30.0130.04713.93
5.3.20.0130.06313.85
5.3.10.0200.03713.68
5.3.00.0100.03713.66
5.2.170.0030.03011.15
5.2.160.0130.03311.15
5.2.150.0100.02711.04
5.2.140.0130.04711.15
5.2.130.0130.05311.13
5.2.120.0030.06311.26
5.2.110.0030.06311.26
5.2.100.0070.04711.00
5.2.90.0070.06311.11
5.2.80.0030.05311.15
5.2.70.0070.06311.26
5.2.60.0000.04311.13
5.2.50.0030.06310.97
5.2.40.0070.03011.16
5.2.30.0030.03011.14
5.2.20.0030.05710.95
5.2.10.0000.03710.86
5.2.00.0170.03710.77
5.1.60.0030.02310.05
5.1.50.0000.04710.02
5.1.40.0030.0239.89
5.1.30.0030.06010.23
5.1.20.0030.04310.32
5.1.10.0030.03310.14
5.1.00.0000.03010.05
5.0.50.0070.0438.62
5.0.40.0100.0278.46
5.0.30.0000.0578.27
5.0.20.0030.0278.17
5.0.10.0000.0338.22
5.0.00.0030.0338.13
4.4.90.0030.0277.83
4.4.80.0030.0177.83
4.4.70.0070.0277.83
4.4.60.0000.0307.83
4.4.50.0030.0207.83
4.4.40.0000.0537.83
4.4.30.0070.0307.83
4.4.20.0070.0137.83
4.4.10.0030.0137.83
4.4.00.0030.0577.83
4.3.110.0030.0207.83
4.3.100.0100.0137.83
4.3.90.0000.0237.83
4.3.80.0100.0407.83
4.3.70.0000.0237.83
4.3.60.0070.0177.83
4.3.50.0030.0337.83
4.3.40.0130.0377.83
4.3.30.0000.0277.83
4.3.20.0000.0237.83
4.3.10.0030.0177.83
4.3.00.0000.0177.83

preferences:
53.91 ms | 401 KiB | 5 Q