3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C1 { public function __construct($p) { $this->p = $p; } } class C2 { public function __construct(C1 $c) { $this->c = $c; } } $c1 = new C1(1); $c2 = new C2($c1); $c1 = new C1(2); var_dump($c2->c->p);

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.0090.00618.30
8.3.50.0150.00721.95
8.3.40.0040.01118.58
8.3.30.0100.01019.21
8.3.20.0030.00520.35
8.3.10.0050.00223.66
8.3.00.0030.00717.50
8.2.180.0110.00418.41
8.2.170.0110.00422.96
8.2.160.0140.01120.52
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0040.00422.24
8.2.110.0030.00720.47
8.2.100.0030.00918.22
8.2.90.0000.00819.21
8.2.80.0000.00817.97
8.2.70.0050.00317.38
8.2.60.0110.00017.65
8.2.50.0090.00018.07
8.2.40.0000.00818.09
8.2.30.0000.00718.05
8.2.20.0040.00417.73
8.2.10.0080.00018.10
8.2.00.0000.00817.67
8.1.280.0170.00325.92
8.1.270.0030.00523.96
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0030.00621.95
8.1.230.0070.00420.88
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0070.00417.22
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0040.00418.45
8.1.160.0000.00721.96
8.1.150.0020.00518.84
8.1.140.0030.00517.34
8.1.130.0000.00917.75
8.1.120.0030.00317.31
8.1.110.0030.00617.44
8.1.100.0000.00717.41
8.1.90.0070.00017.31
8.1.80.0030.00417.43
8.1.70.0050.00217.30
8.1.60.0000.00817.55
8.1.50.0040.00417.46
8.1.40.0040.00417.48
8.1.30.0060.00317.63
8.1.20.0000.00817.55
8.1.10.0080.00017.46
8.1.00.0050.00217.48
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0050.00318.38
8.0.270.0040.00417.25
8.0.260.0030.00317.20
8.0.250.0030.00316.84
8.0.240.0000.00616.90
8.0.230.0070.00016.94
8.0.220.0000.00816.86
8.0.210.0000.00816.91
8.0.200.0040.00416.96
8.0.190.0040.00417.00
8.0.180.0080.00016.92
8.0.170.0030.00316.96
8.0.160.0040.00416.89
8.0.150.0040.00416.75
8.0.140.0040.00416.86
8.0.130.0030.00313.29
8.0.120.0000.00816.80
8.0.110.0040.00416.91
8.0.100.0080.00016.82
8.0.90.0000.00716.79
8.0.80.0110.01116.89
8.0.70.0040.00416.86
8.0.60.0000.00716.77
8.0.50.0000.00716.71
8.0.30.0140.00517.20
8.0.20.0080.01117.40
8.0.10.0000.00817.01
8.0.00.0070.01216.88
7.4.330.0000.00515.00
7.4.320.0030.00316.46
7.4.300.0060.00016.46
7.4.290.0030.00316.61
7.4.280.0030.00616.50
7.4.270.0000.00716.62
7.4.260.0050.00516.39
7.4.250.0080.00016.52
7.4.240.0050.00316.54
7.4.230.0030.00316.61
7.4.220.0070.01116.51
7.4.210.0040.01616.68
7.4.200.0000.00816.42
7.4.160.0030.01316.47
7.4.150.0080.00817.40
7.4.140.0060.01117.86
7.4.130.0120.00516.46
7.4.120.0090.00716.38
7.4.110.0130.01016.40
7.4.100.0070.01016.30
7.4.90.0030.01316.36
7.4.80.0070.01119.39
7.4.70.0160.00016.57
7.4.60.0140.00316.65
7.4.50.0000.00816.41
7.4.40.0140.00716.62
7.4.30.0060.01116.50
7.4.00.0000.01714.98
7.3.330.0030.00313.19
7.3.320.0030.00313.32
7.3.310.0070.00016.40
7.3.300.0000.00716.20
7.3.290.0000.01516.29
7.3.280.0060.01116.26
7.3.270.0090.00917.40
7.3.260.0060.01216.29
7.3.250.0090.00816.29
7.3.240.0120.00616.35
7.3.230.0100.00716.39
7.3.210.0060.01016.31
7.3.200.0130.01019.39
7.3.190.0080.00816.38
7.3.180.0120.00316.39
7.3.170.0060.00916.58
7.3.160.0090.00616.46
7.3.10.0070.00716.57
7.3.00.0060.00616.66
7.2.330.0070.01116.52
7.2.320.0090.00916.39
7.2.310.0060.01016.76
7.2.300.0080.00816.51
7.2.290.0100.01316.45
7.2.130.0090.00616.88
7.2.120.0100.00316.70
7.2.110.0070.00716.63
7.2.100.0070.00716.89
7.2.90.0000.01616.86
7.2.80.0120.00316.88
7.2.70.0090.00617.00
7.2.60.0070.00516.89
7.2.50.0040.00816.78
7.2.40.0070.00417.02
7.2.30.0040.00717.10
7.2.20.0040.00817.00
7.2.10.0070.00716.89
7.2.00.0040.01017.75
7.1.250.0030.00715.88
7.1.200.0090.00615.91
7.1.100.0060.00618.00
7.1.70.0040.00417.15
7.1.60.0090.01519.32
7.1.50.0000.01716.84
7.1.00.0070.07322.41
7.0.200.0030.00716.34
7.0.140.0000.07722.08
7.0.60.0030.08319.85
7.0.50.0030.08717.95
7.0.40.0070.08020.18
7.0.30.0200.04320.28
7.0.20.0270.04320.06
7.0.10.0070.05320.20
7.0.00.0070.07720.18
5.6.280.0100.06721.16
5.6.210.0130.07320.69
5.6.200.0130.07018.18
5.6.190.0070.07320.42
5.6.180.0400.07720.48
5.6.170.0370.06720.49
5.6.160.0100.08020.46
5.6.150.0030.06718.24
5.6.140.0100.08018.18
5.6.130.0070.04318.16
5.6.120.0030.06721.14
5.6.110.0100.07721.11
5.6.100.0070.07720.89
5.6.90.0100.06720.98
5.6.80.0130.07320.53
5.5.350.0070.07720.50
5.5.340.0070.08317.98
5.5.330.0030.04720.25
5.5.320.0130.07320.28
5.5.310.0270.06020.35
5.5.300.0100.06717.95
5.5.290.0030.04317.95
5.5.280.0030.04320.95
5.5.270.0170.07320.79
5.5.260.0030.06720.75
5.5.250.0070.05720.46
5.5.240.0030.08320.27
5.4.450.0770.06019.33
5.4.440.0830.05019.46
5.4.430.0670.06719.30
5.4.420.0670.00019.68
5.4.410.0670.00019.29
5.4.400.0630.00019.09
5.4.390.0630.00019.16
5.4.380.0630.00019.13
5.4.370.0630.00019.07
5.4.360.0600.00019.13
5.4.350.0670.00018.98
5.4.340.0070.04712.02
5.4.320.0050.04212.50
5.4.310.0090.04112.50
5.4.300.0060.04412.50
5.4.290.0070.04212.50
5.4.280.0080.03212.40
5.4.270.0050.03712.40
5.4.260.0050.04212.40
5.4.250.0100.04012.39
5.4.240.0090.03812.40
5.4.230.0070.03912.39
5.4.220.0170.06712.39
5.4.210.0140.04312.39
5.4.200.0100.03912.39
5.4.190.0060.04612.38
5.4.180.0070.04312.39
5.4.170.0150.03612.40
5.4.160.0090.03612.39
5.4.150.0040.04812.39
5.4.140.0050.04212.07
5.4.130.0070.03412.07
5.4.120.0100.03212.02
5.4.110.0060.04312.01
5.4.100.0060.03712.02
5.4.90.0050.04112.02
5.4.80.0110.03612.02
5.4.70.0080.03412.02
5.4.60.0100.03212.01
5.4.50.0050.03612.01
5.4.40.0110.03212.00
5.4.30.0070.03412.00
5.4.20.0080.03412.00
5.4.10.0050.03512.00
5.4.00.0070.03611.48
5.3.290.0060.04512.80
5.3.280.0080.03712.71
5.3.270.0050.04512.73
5.3.260.0100.04112.72
5.3.250.0080.04212.72
5.3.240.0070.03912.72
5.3.230.0070.04012.71
5.3.220.0080.04112.68
5.3.210.0050.03912.68
5.3.200.0080.03612.68
5.3.190.0040.03912.68
5.3.180.0070.03512.67
5.3.170.0060.03712.67
5.3.160.0090.03812.67
5.3.150.0050.03912.67
5.3.140.0050.04412.66
5.3.130.0090.04512.66
5.3.120.0040.04212.66
5.3.110.0050.04112.65
5.3.100.0030.04212.12
5.3.90.0070.04212.11
5.3.80.0050.03812.09
5.3.70.0050.03812.11
5.3.60.0090.03412.08
5.3.50.0040.03912.03
5.3.40.0040.04312.03
5.3.30.0060.03511.99
5.3.20.0030.03911.77
5.3.10.0050.03611.73
5.3.00.0050.03711.72
5.2.170.0060.0299.22
5.2.160.0050.0359.22
5.2.150.0070.0309.22
5.2.140.0040.0329.22
5.2.130.0050.0309.18
5.2.120.0060.0279.18
5.2.110.0070.0299.19
5.2.100.0060.0299.19
5.2.90.0040.0309.19
5.2.80.0040.0339.18
5.2.70.0040.0339.18
5.2.60.0040.0319.13
5.2.50.0030.0339.10
5.2.40.0060.0279.08
5.2.30.0080.0329.06
5.2.20.0050.0289.04
5.2.10.0030.0298.95
5.2.00.0060.0288.81
5.1.60.0070.0218.09
5.1.50.0040.0248.09
5.1.40.0020.0278.07
5.1.30.0050.0268.42
5.1.20.0020.0308.44
5.1.10.0040.0278.17
5.1.00.0060.0268.16
5.0.50.0030.0226.65
5.0.40.0040.0216.50
5.0.30.0060.0296.32
5.0.20.0040.0196.28
5.0.10.0040.0226.26
5.0.00.0090.0306.25
4.4.90.0000.0204.78
4.4.80.0030.0154.75
4.4.70.0020.0204.76
4.4.60.0030.0264.75
4.4.50.0010.0184.77
4.4.40.0020.0274.71
4.4.30.0030.0164.76
4.4.20.0050.0134.84
4.4.10.0020.0174.85
4.4.00.0040.0264.76
4.3.110.0040.0144.67
4.3.100.0030.0154.67
4.3.90.0040.0134.63
4.3.80.0020.0254.59
4.3.70.0040.0174.63
4.3.60.0020.0194.63
4.3.50.0020.0184.63
4.3.40.0050.0304.54
4.3.30.0020.0163.30
4.3.20.0030.0173.28
4.3.10.0020.0173.24
4.3.00.0170.0177.14

preferences:
38.48 ms | 401 KiB | 5 Q