3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { private $bar; private $baz; public function setBar($value) { $foo = new static; $foo->baz = $this->baz; $foo->bar = $value; return $foo; } public function setBaz($value) { $foo = new static; $foo->bar = $this->bar; $foo->baz = $value; return $foo; } } $f = new Foo(); $g = $f->setBar('123'); $h = $g->setBaz('456'); var_dump($f, $g, $h);

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.0140.00716.63
8.3.50.0100.00817.58
8.3.40.0180.00018.47
8.3.30.0100.00718.37
8.3.20.0040.00418.73
8.3.10.0060.00320.38
8.3.00.0060.00319.13
8.2.180.0140.00016.88
8.2.170.0070.00718.84
8.2.160.0130.00722.96
8.2.150.0160.00724.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0060.00320.34
8.2.110.0060.00322.29
8.2.100.0080.00417.66
8.2.90.0040.00417.78
8.2.80.0080.00019.20
8.2.70.0030.00517.80
8.2.60.0000.00917.97
8.2.50.0090.00018.10
8.2.40.0050.00219.22
8.2.30.0040.00418.04
8.2.20.0040.00419.22
8.2.10.0000.00717.68
8.2.00.0000.00817.48
8.1.280.0070.00725.92
8.1.270.0080.00024.66
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.89
8.1.230.0070.00422.62
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0030.00517.25
8.1.180.0090.00018.10
8.1.170.0000.00818.59
8.1.160.0030.00518.88
8.1.150.0050.00318.45
8.1.140.0060.00317.52
8.1.130.0000.00717.82
8.1.120.0070.00017.29
8.1.110.0050.00217.45
8.1.100.0000.00717.43
8.1.90.0050.00217.32
8.1.80.0030.00517.40
8.1.70.0050.00317.36
8.1.60.0000.00717.48
8.1.50.0040.00417.38
8.1.40.0080.00017.51
8.1.30.0060.00317.64
8.1.20.0030.00517.55
8.1.10.0000.00717.57
8.1.00.0000.00817.44
8.0.300.0030.00619.99
8.0.290.0000.00816.63
8.0.280.0040.00418.28
8.0.270.0070.00017.20
8.0.260.0040.00416.80
8.0.250.0000.00716.79
8.0.240.0030.00316.88
8.0.230.0030.00316.87
8.0.220.0030.00316.84
8.0.210.0000.00716.72
8.0.200.0070.00016.88
8.0.190.0040.00416.82
8.0.180.0030.00616.86
8.0.170.0000.00716.72
8.0.160.0030.00316.71
8.0.150.0100.00016.84
8.0.140.0090.00416.88
8.0.130.0030.00313.27
8.0.120.0020.00516.81
8.0.110.0000.00716.79
8.0.100.0040.00416.71
8.0.90.0040.00416.84
8.0.80.0030.01416.84
8.0.70.0000.00716.66
8.0.60.0030.00516.67
8.0.50.0000.00716.77
8.0.30.0070.01017.05
8.0.20.0390.03217.00
8.0.10.0050.00216.84
8.0.00.0110.01016.56
7.4.330.0000.00512.88
7.4.320.0000.00716.46
7.4.300.0030.00316.49
7.4.290.0080.00016.49
7.4.280.0030.00616.52
7.4.270.0000.00816.62
7.4.260.0030.00316.51
7.4.250.0030.00616.41
7.4.240.0000.00716.64
7.4.230.0000.00716.39
7.4.220.0060.01116.60
7.4.210.0070.01316.43
7.4.200.0040.00416.70
7.4.190.0070.00016.55
7.4.160.0030.01316.63
7.4.150.0090.00916.32
7.4.140.0090.00916.61
7.4.130.0130.00516.69
7.4.120.0100.00716.24
7.4.110.0030.01316.66
7.4.100.0090.00916.39
7.4.90.0060.01216.33
7.4.80.0170.01219.39
7.4.70.0130.01216.39
7.4.60.0110.00516.41
7.4.50.0060.00316.46
7.4.40.0040.01516.58
7.4.30.0200.00316.46
7.4.00.0060.00914.61
7.3.330.0030.00313.31
7.3.320.0000.00513.31
7.3.310.0030.00316.31
7.3.300.0030.00316.32
7.3.290.0060.01116.28
7.3.280.0130.00816.28
7.3.270.0110.00716.48
7.3.260.0100.00716.47
7.3.250.0100.00916.49
7.3.240.0000.01616.32
7.3.230.0120.00416.32
7.3.210.0110.00716.29
7.3.200.0130.00316.46
7.3.190.0030.01616.56
7.3.180.0080.00816.59
7.3.170.0080.01116.56
7.3.160.0060.01216.49
7.3.120.0070.01114.88
7.2.330.0090.00916.66
7.2.320.0130.00316.52
7.2.310.0070.01316.54
7.2.300.0090.01216.59
7.2.290.0100.00716.66
7.2.60.0040.01016.64
7.1.200.0030.01015.91
7.1.70.0040.00416.91
7.1.60.0030.00919.30
7.1.50.0090.01216.85
7.1.00.0070.05722.36
7.0.200.0330.01114.63
7.0.140.0030.07322.08
7.0.120.0030.06721.96
7.0.60.0030.08719.93
7.0.50.0070.08317.72
7.0.40.0300.07719.98
7.0.30.0370.07020.21
7.0.20.0400.07020.26
7.0.10.0300.08020.20
7.0.00.0370.07020.16
5.6.280.0030.07321.11
5.6.210.0100.07720.53
5.6.200.0200.06718.20
5.6.190.0330.08020.61
5.6.180.0400.07020.57
5.6.170.0330.07720.65
5.6.160.0300.04020.45
5.6.150.0230.04320.25
5.6.140.0370.04720.50
5.6.130.0300.06720.50
5.6.120.0300.03720.32
5.6.110.0330.06720.16
5.6.100.0370.05720.18
5.6.90.0230.05320.39
5.6.80.0300.06019.89
5.6.70.0230.05719.57
5.6.60.0300.07019.89
5.6.50.0200.04319.79
5.6.40.0330.08019.54
5.6.30.0130.05019.62
5.6.20.0370.07719.70
5.6.10.0300.07019.52
5.6.00.0270.06719.52
5.5.350.0200.07720.47
5.5.340.0130.07318.09
5.5.330.0430.07020.20
5.5.320.0300.08320.42
5.5.310.0370.07020.19
5.5.300.0400.06020.18
5.5.290.0300.07720.12
5.5.280.0270.05320.14
5.5.270.0330.07720.23
5.5.260.0300.06320.11
5.5.250.0370.06719.93
5.5.240.0370.07319.56
5.5.230.0270.04019.41
5.5.220.0330.07019.34
5.5.210.0630.04019.67
5.5.200.0330.06319.32
5.5.190.0230.04019.34
5.5.180.0270.08019.34
5.5.160.0300.07019.32
5.5.150.0370.07019.38
5.5.140.0270.06319.49
5.5.130.0300.03019.48
5.5.120.0300.07019.52
5.5.110.0230.07319.31
5.5.100.0170.04019.23
5.5.90.0230.03319.40
5.5.80.0230.07319.29
5.5.70.0270.04019.46
5.5.60.0200.05019.41
5.5.50.0270.06719.56
5.5.40.0300.03719.61
5.5.30.0230.05719.42
5.5.20.0270.03019.47
5.5.10.0230.03319.31
5.5.00.0230.03319.41
5.4.450.0330.04719.48
5.4.440.0300.07319.27
5.4.430.0370.06719.30
5.4.420.0330.06019.30
5.4.410.0300.06719.31
5.4.400.0270.06019.24
5.4.390.0330.03718.88
5.4.380.0300.05318.88
5.4.370.0330.07019.21
5.4.360.0370.05319.05
5.4.350.0430.03718.98
5.4.340.0370.06719.24
5.4.320.0270.06718.98
5.4.310.0330.06019.16
5.4.300.0270.05319.24
5.4.290.0230.03719.11
5.4.280.0230.06019.00
5.4.270.0300.03018.89
5.4.260.0230.03319.18
5.4.250.0130.04719.23
5.4.240.0300.06319.15
5.4.230.0270.07319.00
5.4.220.0330.07019.24
5.4.210.0270.04719.00
5.4.200.0270.03718.97
5.4.190.0170.04018.84
5.4.180.0170.04019.14
5.4.170.0200.04319.14
5.4.160.0230.03018.85
5.4.150.0270.03018.90
5.4.140.0170.03716.41
5.4.130.0170.03716.45
5.4.120.0170.03716.51
5.4.110.0170.05716.45
5.4.100.0330.03016.30
5.4.90.0170.03716.28
5.4.80.0170.04016.66
5.4.70.0300.02716.52
5.4.60.0200.03716.29
5.4.50.0230.03716.47
5.4.40.0170.03716.37
5.4.30.0230.05316.30
5.4.20.0230.04716.41
5.4.10.0170.04716.32
5.4.00.0270.05315.79
5.3.290.0330.06314.75
5.3.280.0330.06314.65
5.3.270.0300.02714.62
5.3.260.0230.03314.50
5.3.250.0200.04014.53
5.3.240.0100.04314.50
5.3.230.0300.04314.63
5.3.220.0270.02714.63
5.3.210.0230.05014.57
5.3.200.0270.04314.57
5.3.190.0170.05014.57
5.3.180.0130.04014.63
5.3.170.0300.06714.59
5.3.160.0230.03314.59
5.3.150.0230.03314.61
5.3.140.0130.04014.45
5.3.130.0230.03714.73
5.3.120.0300.06714.47
5.3.110.0170.05714.45
5.3.100.0200.06014.09
5.3.90.0270.06014.10
5.3.80.0300.06314.04
5.3.70.0330.06314.08
5.3.60.0300.06014.02
5.3.50.0370.05713.97
5.3.40.0270.04013.98
5.3.30.0370.06313.96
5.3.20.0300.07313.72
5.3.10.0270.03713.61
5.3.00.0200.04713.81
5.2.170.0200.04012.57
5.2.160.0300.04712.57
5.2.150.0200.04312.57
5.2.140.0230.05712.57
5.2.130.0230.03012.57
5.2.120.0300.03312.57
5.2.110.0230.04712.57
5.2.100.0200.03712.57
5.2.90.0230.05312.57
5.2.80.0270.06012.57
5.2.70.0270.05712.57
5.2.60.0230.06312.57
5.2.50.0200.04712.57
5.2.40.0330.05312.57
5.2.30.0130.06712.57
5.2.20.0170.05712.57
5.2.10.0130.04012.57
5.2.00.0170.02712.57
5.1.60.0200.03312.57
5.1.50.0170.03712.57
5.1.40.0100.03012.57
5.1.30.0130.02712.57
5.1.20.0130.02712.57
5.1.10.0570.03012.57
5.1.00.0230.04312.57
5.0.50.0170.03012.57
5.0.40.0100.03312.57
5.0.30.0100.06312.57
5.0.20.0070.03312.57
5.0.10.0130.04012.57
5.0.00.0030.06712.57
4.4.90.0170.02312.57
4.4.80.0170.03712.57
4.4.70.0070.02012.57
4.4.60.0070.01712.57
4.4.50.0100.03012.57
4.4.40.0030.06012.57
4.4.30.0030.01712.57
4.4.20.0100.02712.57
4.4.10.0070.04012.57
4.4.00.0170.04712.57
4.3.110.0170.02312.57
4.3.100.0070.02312.57
4.3.90.0100.02712.57
4.3.80.0230.04012.57
4.3.70.0130.02012.57
4.3.60.0070.03012.57
4.3.50.0130.03312.57
4.3.40.0070.05012.57
4.3.30.0030.03012.57
4.3.20.0070.03312.57
4.3.10.0100.03312.57
4.3.00.0070.02712.57

preferences:
53.4 ms | 401 KiB | 5 Q