3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar; public function setBar($bar) { $this->bar = $bar; } public function getBar() { return $this->bar; } public function setName($name) { $this->getBar()->name_from_get = 'Baz'; $this->bar->name_directly = 'Baz'; } } $f = new Foo(); $f->setBar(new \stdClass()); $f->setName('Baz'); var_dump($f->getBar());

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.01116.47
8.3.50.0060.01016.36
8.3.40.0140.00018.71
8.3.30.0130.00318.71
8.3.20.0040.00421.61
8.3.10.0060.00323.63
8.3.00.0080.00019.56
8.2.180.0130.00618.04
8.2.170.0150.00022.96
8.2.160.0140.00020.45
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0070.00020.32
8.2.120.0100.01026.35
8.2.110.0060.00320.94
8.2.100.0160.00017.77
8.2.90.0080.00017.63
8.2.80.0040.00417.97
8.2.70.0030.00617.91
8.2.60.0000.00817.82
8.2.50.0040.00418.10
8.2.40.0040.00422.34
8.2.30.0040.00419.11
8.2.20.0030.00518.05
8.2.10.0000.00818.00
8.2.00.0070.00017.88
8.1.280.0100.01025.92
8.1.270.0050.00318.59
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00817.36
8.1.230.0110.00017.82
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0040.00417.23
8.1.190.0000.00917.10
8.1.180.0030.00618.10
8.1.170.0090.00220.02
8.1.160.0040.00418.76
8.1.150.0000.00720.28
8.1.140.0030.00519.44
8.1.130.0040.00418.76
8.1.120.0030.00617.45
8.1.110.0000.00717.29
8.1.100.0040.00417.38
8.1.90.0040.00417.34
8.1.80.0000.00817.32
8.1.70.0030.00317.38
8.1.60.0040.00417.63
8.1.50.0040.00417.55
8.1.40.0040.00417.54
8.1.30.0060.00317.65
8.1.20.0040.00417.53
8.1.10.0030.00617.61
8.1.00.0040.00417.49
8.0.300.0000.00718.77
8.0.290.0030.00616.75
8.0.280.0070.00018.45
8.0.270.0000.00817.16
8.0.260.0030.00318.73
8.0.250.0030.00316.81
8.0.240.0040.00416.93
8.0.230.0000.00816.80
8.0.220.0030.00316.82
8.0.210.0040.00416.77
8.0.200.0080.00016.81
8.0.190.0030.00616.79
8.0.180.0000.00716.82
8.0.170.0080.00016.86
8.0.160.0040.00316.88
8.0.150.0040.00416.77
8.0.140.0000.00716.71
8.0.130.0070.00013.21
8.0.120.0070.00016.68
8.0.110.0000.00816.79
8.0.100.0000.00716.65
8.0.90.0000.00816.72
8.0.80.0000.01416.88
8.0.70.0040.00416.82
8.0.60.0070.00016.91
8.0.50.0030.00316.71
8.0.30.0070.01017.07
8.0.20.0100.00917.40
8.0.10.0050.00216.94
8.0.00.0090.01216.94
7.4.330.0050.00015.55
7.4.320.0000.00816.41
7.4.300.0030.00316.44
7.4.290.0030.00316.50
7.4.280.0080.00016.59
7.4.270.0030.00316.60
7.4.260.0000.00716.52
7.4.250.0050.00316.54
7.4.240.0000.00716.54
7.4.230.0040.00416.64
7.4.220.0070.01016.59
7.4.210.0100.01016.50
7.4.200.0070.00016.31
7.4.160.0090.01116.39
7.4.150.0150.00317.40
7.4.140.0110.01317.86
7.4.130.0100.00716.56
7.4.120.0060.01316.54
7.4.110.0120.00616.41
7.4.100.0120.00616.38
7.4.90.0080.00816.38
7.4.80.0120.00619.39
7.4.70.0050.01116.58
7.4.60.0030.01316.55
7.4.50.0140.00416.48
7.4.40.0030.01316.54
7.4.30.0130.00716.49
7.4.00.0000.01514.81
7.3.330.0000.00613.27
7.3.320.0050.00013.13
7.3.310.0000.00716.32
7.3.300.0000.00716.35
7.3.290.0060.01016.29
7.3.280.0080.01016.26
7.3.270.0070.01417.40
7.3.260.0110.01016.29
7.3.250.0110.00716.33
7.3.240.0090.00916.43
7.3.230.0070.01016.46
7.3.210.0080.00816.29
7.3.200.0090.00916.29
7.3.190.0000.01916.45
7.3.180.0150.00016.35
7.3.170.0120.00416.30
7.3.160.0030.01316.61
7.3.00.0070.00916.42
7.2.330.0210.00316.33
7.2.320.0030.01316.60
7.2.310.0020.00616.56
7.2.300.0080.01116.64
7.2.290.0060.01216.52
7.2.130.0100.00716.66
7.2.120.0100.00616.82
7.2.110.0050.00816.84
7.2.100.0080.00716.58
7.2.90.0060.00916.90
7.2.80.0100.00516.81
7.2.70.0080.01016.63
7.2.60.0120.00416.75
7.2.50.0050.00816.80
7.2.40.0060.00916.79
7.2.30.0090.00916.68
7.2.20.0090.00516.84
7.2.10.0070.01016.79
7.2.00.0050.01016.85
7.1.250.0090.00915.66
7.1.240.0090.00815.64
7.1.230.0070.00915.62
7.1.220.0120.00315.62
7.1.210.0100.00615.57
7.1.200.0050.01015.68
7.1.190.0040.00815.75
7.1.180.0080.00615.69
7.1.170.0070.00715.79
7.1.160.0100.00515.56
7.1.150.0020.01115.69
7.1.140.0070.00715.57
7.1.130.0080.00715.54
7.1.120.0050.00715.71
7.1.110.0060.00815.51
7.1.100.0070.01015.81
7.1.90.0070.00715.83
7.1.80.0090.00815.79
7.1.70.0050.00716.09
7.1.60.0170.00821.36
7.1.50.0540.01121.53
7.1.40.0280.01021.41
7.1.30.0470.01021.27
7.1.20.0130.01121.30
7.1.10.0440.00715.29
7.1.00.0440.01015.33
7.0.330.0030.00715.28
7.0.320.0100.00914.97
7.0.310.0110.00915.06
7.0.300.0090.00515.28
7.0.290.0030.01015.15
7.0.280.0110.00714.85
7.0.270.0050.00714.98
7.0.260.0080.01015.02
7.0.250.0050.00915.32
7.0.240.0020.01215.36
7.0.230.0100.00715.40
7.0.220.0120.00315.44
7.0.210.0130.00615.37
7.0.200.0290.00815.17
7.0.190.0370.00815.24
7.0.180.0170.00814.89
7.0.170.0070.00714.97
7.0.160.0320.00614.91
7.0.150.0340.01214.89
7.0.140.0530.01315.05
7.0.130.0170.00715.18
7.0.120.0070.00915.08
7.0.110.0210.00815.08
7.0.100.0120.00914.91
7.0.90.0090.00814.91
7.0.80.0090.00814.97
7.0.70.0180.01014.95
7.0.60.0220.00814.90
7.0.50.0420.00614.93
7.0.40.0050.01013.71
7.0.30.0040.01213.75
7.0.20.0180.00613.73
7.0.10.0490.00913.79
7.0.00.0460.00713.74
5.6.380.0070.00514.34

preferences:
49.69 ms | 400 KiB | 5 Q