3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar; public function __construct($bar) { $this->bar = $bar; } public function getBar() { return $this->bar; } public function setBar($bar) { $this->bar = $bar; } } $foo = new Foo(42); Debug::ProcessingTimeSinceLastCall(); //Without Setter and Getter for ($i = 0; $i < 1000000; $i++) { if ($foo->bar === 42) { $foo->bar = 43; } else { $foo->bar = 42; } } Debug::ProcessingTimeSinceLastCall('No Setter and Getter'); //With Getter and Setter for ($i = 0; $i < 1000000; $i++) { if ($foo->getBar() === 42) { $foo->setBar(43); } else { $foo->setBar(42); } } Debug::ProcessingTimeSinceLastCall('With Setter and Getter');

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.0100.01317.00
8.3.50.0200.01022.05
8.3.40.0150.00018.79
8.3.30.0120.00318.79
8.3.20.0070.00020.33
8.3.10.0080.00023.62
8.3.00.0040.00419.38
8.2.180.0150.00718.29
8.2.170.0170.00322.96
8.2.160.0030.01022.21
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0030.00617.50
8.2.120.0050.00226.35
8.2.110.0000.01022.25
8.2.100.0080.00417.90
8.2.90.0060.00319.13
8.2.80.0000.01017.97
8.2.70.0030.00617.50
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0000.00821.20
8.2.30.0030.00320.63
8.2.20.0080.00017.60
8.2.10.0040.00417.95
8.2.00.0040.00417.93
8.1.280.0180.00725.92
8.1.270.0040.00422.06
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0090.00022.61
8.1.230.0040.00817.66
8.1.220.0000.00817.74
8.1.210.0000.00918.77
8.1.200.0030.00617.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0030.00618.98
8.1.160.0000.00721.97
8.1.150.0040.00418.75
8.1.140.0000.00819.58
8.1.130.0040.00417.66
8.1.120.0040.00417.50
8.1.110.0040.00417.30
8.1.100.0060.00317.39
8.1.90.0000.00717.34
8.1.80.0050.00317.32
8.1.70.0030.00317.34
8.1.60.0000.00817.61
8.1.50.0000.00817.43
8.1.40.0050.00317.59
8.1.30.0000.00817.71
8.1.20.0060.00317.54
8.1.10.0000.00717.48
8.1.00.0040.00417.38
8.0.300.0070.00018.77
8.0.290.0000.00816.88
8.0.280.0030.00318.25
8.0.270.0070.00017.08
8.0.260.0030.00317.26
8.0.250.0070.00016.87
8.0.240.0070.00016.91
8.0.230.0000.00716.80
8.0.220.0040.00416.95
8.0.210.0000.00816.89
8.0.200.0000.00616.84
8.0.190.0040.00416.87
8.0.180.0040.00416.97
8.0.170.0030.00616.85
8.0.160.0030.00316.91
8.0.150.0040.00416.76
8.0.140.0080.00016.73
8.0.130.0060.00013.38
8.0.120.0000.00816.92
8.0.110.0000.00716.82
8.0.100.0050.00216.80
8.0.90.0040.00416.91
8.0.80.0060.00916.96
8.0.70.0000.00716.95
8.0.60.0080.00016.89
8.0.50.0070.00016.74
8.0.30.0090.00917.09
8.0.20.0110.01017.40
8.0.10.0060.00316.88
8.0.00.0090.00816.74
7.4.330.0020.00216.84
7.4.320.0000.00616.57
7.4.300.0000.00716.60
7.4.290.0070.00016.52
7.4.280.0000.00916.62
7.4.270.0030.00316.50
7.4.260.0040.00416.57
7.4.250.0080.00016.43
7.4.240.0000.00716.60
7.4.230.0040.00416.51
7.4.220.0100.00716.46
7.4.210.0210.00016.70
7.4.200.0050.00216.50
7.4.160.0060.00916.74
7.4.150.0090.00917.40
7.4.140.0120.00917.86
7.4.130.0110.00616.61
7.4.120.0120.00816.61
7.4.110.0130.00616.48
7.4.100.0090.00916.44
7.4.90.0160.00316.32
7.4.80.0160.00719.39
7.4.70.0000.01916.38
7.4.60.0060.01016.45
7.4.50.0060.00616.74
7.4.40.0090.00916.45
7.4.30.0140.01016.46
7.4.00.0030.00915.07
7.3.330.0000.00513.35
7.3.320.0060.00013.16
7.3.310.0040.00416.26
7.3.300.0070.00016.23
7.3.290.0080.00916.35
7.3.280.0110.01016.37
7.3.270.0030.01317.40
7.3.260.0150.00316.39
7.3.250.0090.00816.50
7.3.240.0090.00916.32
7.3.230.0140.00316.48
7.3.210.0060.01216.43
7.3.200.0100.00916.35
7.3.190.0090.00816.47
7.3.180.0090.00916.56
7.3.170.0100.01016.35
7.3.160.0120.00316.37
7.2.330.0060.01216.76
7.2.320.0070.01016.65
7.2.310.0110.00716.74
7.2.300.0100.00716.74
7.2.290.0070.01116.57
7.2.60.0040.00916.67
7.2.00.0090.00319.43
7.1.200.0000.01415.69
7.1.100.0000.01017.91
7.1.70.0060.00317.03
7.1.60.0080.01519.48
7.1.50.0060.01516.82
7.1.00.0000.07722.48
7.0.200.0140.00414.85
7.0.60.0100.08020.07
7.0.50.0100.07717.91
7.0.40.0030.06020.11
7.0.30.0030.07720.27
7.0.20.0200.03720.21
7.0.10.0100.08020.09
7.0.00.0100.03320.05
5.6.280.0000.07720.91
5.6.210.0100.04320.65
5.6.200.0100.04018.19
5.6.190.0000.09020.45
5.6.180.0300.07320.41
5.6.170.0330.05720.62
5.6.160.0030.07720.39
5.6.150.0070.03718.18
5.6.140.0030.08318.15
5.6.130.0170.06718.21
5.6.120.0130.05021.15
5.6.110.0300.06721.00
5.6.100.0100.06320.98
5.6.90.0000.09021.01
5.6.80.0130.06020.53
5.5.350.4200.04320.39
5.5.340.0030.08718.07
5.5.330.0030.06720.29
5.5.320.0200.03720.51
5.5.310.0430.06320.27
5.5.300.0100.08318.03
5.5.290.0070.08317.98
5.5.280.0030.04320.99
5.5.270.0070.08320.77
5.5.260.0100.07320.80
5.5.250.0070.04320.59
5.5.240.0330.06020.27

preferences:
52.12 ms | 401 KiB | 5 Q