3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $allowedNames = ['onlyThis', 'andThat']; public function __set($name, $value) { // only allow specific properties to be set pubically if (!in_array($name, $this->allowedNames)) { throw new Exception("No! Bad dog!"); } else { $this->$name = $value; } } } $foo = new Foo; $foo->onlyThis = true; $foo->andThat = false; var_dump($foo); // This won't work $foo->baz = 1;

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.0150.00318.56
8.3.50.0040.01116.48
8.3.40.0090.00918.85
8.3.30.0070.00718.77
8.3.20.0040.00421.81
8.3.10.0040.00420.34
8.3.00.0040.00423.66
8.2.180.0150.00018.29
8.2.170.0070.01022.96
8.2.160.0070.00720.53
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00826.16
8.2.110.0000.01122.11
8.2.100.0070.00417.91
8.2.90.0090.00017.67
8.2.80.0090.00019.29
8.2.70.0050.00517.63
8.2.60.0080.00017.93
8.2.50.0000.00818.05
8.2.40.0040.00418.30
8.2.30.0000.00719.41
8.2.20.0040.00418.16
8.2.10.0040.00419.23
8.2.00.0000.01019.29
8.1.280.0040.01125.92
8.1.270.0050.00322.20
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00320.94
8.1.230.0080.00320.97
8.1.220.0040.00417.76
8.1.210.0030.00518.96
8.1.200.0040.00417.35
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0050.00317.62
8.1.160.0030.00518.79
8.1.150.0050.00318.93
8.1.140.0000.00820.80
8.1.130.0040.00417.45
8.1.120.0040.00417.50
8.1.110.0040.00417.41
8.1.100.0030.00617.48
8.1.90.0070.00017.44
8.1.80.0030.00617.47
8.1.70.0000.00717.27
8.1.60.0040.00417.63
8.1.50.0030.00617.51
8.1.40.0040.00417.51
8.1.30.0040.00417.54
8.1.20.0040.00417.63
8.1.10.0000.00917.46
8.1.00.0040.00417.52
8.0.300.0040.00420.10
8.0.290.0030.00616.63
8.0.280.0070.00018.57
8.0.270.0000.00818.07
8.0.260.0030.00316.85
8.0.250.0030.00416.92
8.0.240.0000.00716.88
8.0.230.0030.00717.04
8.0.220.0070.00016.82
8.0.210.0040.00416.92
8.0.200.0070.00016.88
8.0.190.0040.00416.91
8.0.180.0060.00316.94
8.0.170.0030.00516.93
8.0.160.0040.00416.96
8.0.150.0000.00816.87
8.0.140.0030.00316.90
8.0.130.0000.00613.37
8.0.120.0000.00716.88
8.0.110.0000.00916.84
8.0.100.0040.00416.91
8.0.90.0090.00016.86
8.0.80.0090.00716.92
8.0.70.0000.00816.95
8.0.60.0070.00016.85
8.0.50.0000.00716.96
8.0.30.0090.00917.02
8.0.20.0070.01216.84
8.0.10.0030.00516.96
8.0.00.0130.00616.96
7.4.330.0020.00216.81
7.4.320.0070.00016.60
7.4.300.0030.00316.43
7.4.290.0000.00816.48
7.4.280.0000.00816.59
7.4.270.0080.00016.52
7.4.260.0060.00013.16
7.4.250.0000.00716.48
7.4.240.0040.00416.43
7.4.230.0030.00316.70
7.4.220.0050.00216.63
7.4.210.0070.01016.59
7.4.200.0000.00716.52
7.4.130.0120.00616.50
7.4.120.0120.00616.57
7.4.110.0080.00816.46
7.4.100.0160.00416.43
7.4.90.0110.01116.68
7.4.80.0120.01119.39
7.4.70.0140.00716.74
7.4.60.0140.01016.34
7.4.50.0030.01316.46
7.4.40.0110.00716.37
7.4.20.0030.01516.43
7.4.10.0130.01016.41
7.4.00.0090.01516.60
7.3.330.0070.00016.22
7.3.320.0060.00013.37
7.3.310.0040.00416.40
7.3.300.0030.00316.40
7.3.290.0060.00916.40
7.3.260.0100.01116.59
7.3.240.0130.00716.47
7.3.230.0090.00816.51
7.3.210.0180.00016.46
7.3.200.0030.01316.30
7.3.190.0120.00616.42
7.3.180.0110.01116.30
7.3.170.0110.00816.46
7.3.160.0070.01016.41
7.3.130.0170.00616.30
7.3.120.0090.01216.37
7.3.110.0100.00716.33
7.3.100.0060.01616.41
7.3.90.0070.01116.30
7.3.80.0100.01016.47
7.3.70.0140.00316.51
7.3.60.0100.00716.40
7.3.50.0110.01116.27
7.3.40.0060.01516.34
7.3.30.0130.00316.27
7.3.20.0130.01016.35
7.3.10.0060.01216.41
7.3.00.0130.01016.35
7.2.330.0140.00416.37
7.2.320.0040.01516.38
7.2.310.0030.01416.68
7.2.300.0150.00516.50
7.2.290.0030.01716.50
7.2.260.0160.00316.35
7.2.250.0160.00716.71
7.2.240.0060.01216.51
7.2.230.0040.01716.82
7.2.220.0090.00916.42
7.2.210.0120.01316.74
7.2.200.0070.01016.50
7.2.190.0100.01016.52
7.2.180.0070.01516.54
7.2.170.0060.01716.54
7.2.160.0130.00916.74
7.2.150.0040.01516.51
7.2.140.0060.01216.58
7.2.130.0180.00616.69
7.2.120.0080.01116.73
7.2.110.0090.00916.63
7.2.100.0110.01316.72
7.2.90.0120.01216.57
7.2.80.0100.01016.51
7.2.70.0150.00716.57
7.2.60.0100.01216.65
7.2.50.0120.01216.61
7.2.40.0210.00316.55
7.2.30.0070.01316.58
7.2.20.0100.01016.55
7.2.10.0040.01516.85
7.2.00.0120.00616.73

preferences:
59.08 ms | 400 KiB | 5 Q