3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bear { private $age = 0; public function setAge($age) { if ($age < 0) { throw new Exception('Bear cannot have negative age dumbass'); } $this->age = $age; } } $bear1 = new Bear(); $bear1->setAge(25); $bear2 = new Bear(); $bear2->setAge(-10); var_dump($bear1); var_dump($bear2);

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.0040.01116.88
8.3.50.0090.00922.18
8.3.40.0120.00618.70
8.3.30.0060.00918.84
8.3.20.0040.00420.07
8.3.10.0080.00023.56
8.3.00.0030.00520.81
8.2.180.0130.00716.63
8.2.170.0140.00018.90
8.2.160.0110.00422.96
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0070.00419.39
8.2.120.0040.00426.35
8.2.110.0030.00622.11
8.2.100.0060.00617.93
8.2.90.0080.00019.08
8.2.80.0000.00918.04
8.2.70.0060.00317.50
8.2.60.0000.00717.80
8.2.50.0040.00418.07
8.2.40.0080.00022.15
8.2.30.0040.00420.63
8.2.20.0040.00417.69
8.2.10.0030.00617.98
8.2.00.0070.00017.96
8.1.280.0060.00925.92
8.1.270.0060.01320.36
8.1.260.0040.00428.09
8.1.250.0050.00228.09
8.1.240.0000.00923.88
8.1.230.0030.00919.01
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0040.00417.35
8.1.190.0090.00017.22
8.1.180.0080.00018.10
8.1.170.0080.00018.51
8.1.160.0050.00220.77
8.1.150.0050.00218.90
8.1.140.0030.00519.58
8.1.130.0000.00717.73
8.1.120.0070.00017.50
8.1.110.0070.00417.50
8.1.100.0000.00717.37
8.1.90.0060.00317.51
8.1.80.0080.00017.35
8.1.70.0040.00417.39
8.1.60.0050.00317.59
8.1.50.0050.00517.54
8.1.40.0080.00017.57
8.1.30.0040.00417.68
8.1.20.0000.00817.68
8.1.10.0050.00317.66
8.1.00.0000.00817.42
8.0.300.0070.00018.77
8.0.290.0000.00816.75
8.0.280.0000.00718.42
8.0.270.0000.00717.18
8.0.260.0000.00617.21
8.0.250.0070.00016.95
8.0.240.0000.00716.93
8.0.230.0040.00416.96
8.0.220.0070.00016.81
8.0.210.0000.00816.89
8.0.200.0070.00017.01
8.0.190.0070.00016.93
8.0.180.0070.00016.94
8.0.170.0000.00816.82
8.0.160.0000.00816.98
8.0.150.0040.00416.98
8.0.140.0070.00316.77
8.0.130.0000.00713.48
8.0.120.0050.00316.95
8.0.110.0040.00417.04
8.0.100.0000.00716.82
8.0.90.0000.00716.93
8.0.80.0040.01116.93
8.0.70.0040.00416.75
8.0.60.0070.00017.04
8.0.50.0060.00316.96
8.0.30.0090.00817.27
8.0.20.0110.00717.40
8.0.10.0040.00416.98
8.0.00.0090.00916.86
7.4.330.0000.00516.73
7.4.320.0060.00016.45
7.4.300.0030.00316.62
7.4.290.0030.00316.54
7.4.280.0030.00616.52
7.4.270.0030.00316.63
7.4.260.0070.00016.60
7.4.250.0000.00716.58
7.4.240.0040.00316.57
7.4.230.0030.00316.64
7.4.220.0040.01716.55
7.4.210.0100.00716.57
7.4.200.0000.00716.45
7.4.160.0100.00716.33
7.4.150.0330.00317.40
7.4.140.0160.00617.86
7.4.130.0080.01316.56
7.4.120.0110.00716.50
7.4.110.0110.00716.61
7.4.100.0080.01216.44
7.4.90.0090.00916.64
7.4.80.0070.01319.39
7.4.70.0090.01216.44
7.4.60.0030.01416.59
7.4.50.0070.01116.45
7.4.40.0090.00916.59
7.4.30.0060.01716.45
7.4.00.0130.00314.84
7.3.330.0000.00613.36
7.3.320.0080.00013.23
7.3.310.0000.00816.36
7.3.300.0070.00016.23
7.3.290.0130.00416.25
7.3.280.0080.01216.36
7.3.270.0120.00617.40
7.3.260.0060.00916.48
7.3.250.0070.01016.51
7.3.240.0140.00216.45
7.3.230.0060.01916.59
7.3.210.0120.00916.60
7.3.200.0130.00616.62
7.3.190.0080.00816.53
7.3.180.0100.00716.43
7.3.170.0070.01116.57
7.3.160.0100.00616.50
7.2.330.0120.01216.75
7.2.320.0060.01116.42
7.2.310.0060.00916.65
7.2.300.0150.00816.50
7.2.290.0110.00516.49
7.2.60.0060.00916.93
7.2.00.0030.01019.27
7.1.200.0030.00615.89
7.1.100.0000.01218.04
7.1.70.0040.00417.20
7.1.60.0000.02319.52
7.1.50.0030.01717.05
7.1.00.0000.08022.37
7.0.200.0000.00716.43
7.0.60.0100.03719.99
7.0.50.0030.08717.88
7.0.40.0100.03720.24
7.0.30.0230.04320.26
7.0.20.0200.04720.16
7.0.10.0100.08320.23
7.0.00.0130.07720.34
5.6.280.0000.05320.89
5.6.210.0230.06020.45
5.6.200.0070.08318.18
5.6.190.0070.04320.58
5.6.180.0300.04020.50
5.6.170.0270.07720.48
5.6.160.0170.08020.43
5.6.150.0000.04318.18
5.6.140.0000.04318.13
5.6.130.0070.03718.11
5.6.120.0130.05321.00
5.6.110.0100.07320.99
5.6.100.0070.08021.01
5.6.90.0030.08720.98
5.6.80.0070.08020.51
5.5.350.4230.04320.41
5.5.340.0070.08317.96
5.5.330.0100.07720.27
5.5.320.0370.07320.25
5.5.310.0030.05320.35
5.5.300.0130.07318.03
5.5.290.0070.05017.96
5.5.280.0030.07320.84
5.5.270.0070.08720.79
5.5.260.0100.08020.64
5.5.250.0100.07720.70
5.5.240.3300.03320.16

preferences:
57.27 ms | 401 KiB | 5 Q