3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Immutable { public function __set($name, $value) { throw new Exception("can't touch this, nah nah nuh nahhh"); } public function __get($name) { return $this->$name; } } class ImmutableThingy { use Immutable; protected $foo; public function __construct($foo) { $this->foo = $foo; } } $thing = new ImmutableThingy("bar"); var_dump($thing, $thing->foo); $thing->foo = 'baz'; var_dump($thing, $thing->foo);

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.00016.88
8.3.50.0120.00316.24
8.3.40.0120.00318.75
8.3.30.0150.00018.63
8.3.20.0080.00022.16
8.3.10.0040.00421.76
8.3.00.0060.00321.86
8.2.180.0090.00616.61
8.2.170.0060.01222.96
8.2.160.0060.00920.38
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0080.00020.75
8.2.120.0040.00426.35
8.2.110.0000.00919.40
8.2.100.0110.00017.93
8.2.90.0100.00019.21
8.2.80.0040.00417.97
8.2.70.0130.00017.74
8.2.60.0050.00317.93
8.2.50.0060.00318.09
8.2.40.0000.00922.45
8.2.30.0040.00419.50
8.2.20.0090.00017.81
8.2.10.0070.00018.09
8.2.00.0040.00418.05
8.1.280.0130.00725.92
8.1.270.0110.00722.01
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0000.01022.42
8.1.230.0070.00417.71
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0070.00317.22
8.1.190.0060.00317.25
8.1.180.0080.00018.10
8.1.170.0050.00318.62
8.1.160.0020.00520.64
8.1.150.0030.00318.92
8.1.140.0040.00419.58
8.1.130.0080.00017.75
8.1.120.0000.00717.46
8.1.110.0040.00417.41
8.1.100.0050.00317.39
8.1.90.0000.00717.30
8.1.80.0040.00417.49
8.1.70.0040.00417.44
8.1.60.0050.00317.59
8.1.50.0040.00417.38
8.1.40.0040.00417.46
8.1.30.0050.00317.67
8.1.20.0030.00617.62
8.1.10.0040.00417.59
8.1.00.0030.00617.56
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0030.00318.44
8.0.270.0050.00217.31
8.0.260.0060.00017.13
8.0.250.0030.00316.89
8.0.240.0030.00317.00
8.0.230.0030.00316.91
8.0.220.0100.00016.87
8.0.210.0020.00516.96
8.0.200.0030.00317.06
8.0.190.0000.00816.92
8.0.180.0070.00016.98
8.0.170.0070.00016.99
8.0.160.0040.00316.98
8.0.150.0040.00416.96
8.0.140.0000.00716.93
8.0.130.0000.00513.39
8.0.120.0040.00416.80
8.0.110.0000.00716.84
8.0.100.0000.00716.97
8.0.90.0040.00416.92
8.0.80.0060.00917.01
8.0.70.0000.00716.90
8.0.60.0040.00416.86
8.0.50.0050.00217.00
8.0.30.0080.01017.02
8.0.20.0110.01017.40
8.0.10.0070.00017.07
8.0.00.0120.00916.60
7.4.330.0000.00616.78
7.4.320.0030.00316.43
7.4.300.0030.00316.55
7.4.290.0000.00716.50
7.4.280.0060.00316.61
7.4.270.0040.00416.40
7.4.260.0000.00916.35
7.4.250.0040.00416.48
7.4.240.0030.00416.60
7.4.230.0080.00016.63
7.4.220.0080.01216.54
7.4.210.0120.00616.60
7.4.200.0030.00316.50
7.4.160.0090.00916.59
7.4.150.0000.01717.40
7.4.140.0080.01217.86
7.4.130.0090.00816.48
7.4.120.0090.00816.64
7.4.110.0170.00016.70
7.4.100.0040.01316.50
7.4.90.0090.00916.58
7.4.80.0030.01619.39
7.4.70.0060.01116.70
7.4.60.0070.01016.45
7.4.50.0090.00616.46
7.4.40.0120.00316.38
7.4.30.0090.00916.39
7.4.00.0130.00315.13
7.3.330.0030.00313.39
7.3.320.0050.00013.42
7.3.310.0070.00016.52
7.3.300.0000.00716.43
7.3.290.0060.00016.25
7.3.280.0080.00916.40
7.3.270.0090.01617.40
7.3.260.0130.00416.33
7.3.250.0070.01016.33
7.3.240.0130.00616.37
7.3.230.0090.00916.44
7.3.210.0060.01116.27
7.3.200.0070.01119.39
7.3.190.0130.00316.54
7.3.180.0070.01116.51
7.3.170.0060.01516.57
7.3.160.0100.00716.46
7.2.330.0110.00616.87
7.2.320.0060.01216.47
7.2.310.0140.00316.63
7.2.300.0100.00616.52
7.2.290.0060.00916.82
7.2.60.0000.01416.88
7.2.00.0070.00718.97
7.1.200.0080.00315.87
7.1.100.0070.00718.05
7.1.70.0070.00317.34
7.1.60.0070.01619.40
7.1.50.0110.00316.96
7.1.00.0030.07722.29
7.0.200.0440.00714.95
7.0.100.0200.05319.95
7.0.90.0000.04719.90
7.0.80.0230.03019.89
7.0.70.0100.08019.84
7.0.60.0070.08020.05
7.0.50.0070.04720.31
7.0.40.0070.07020.09
7.0.30.0100.03720.15
7.0.20.0170.07720.05
7.0.10.0030.08320.09
7.0.00.0100.07719.95
5.6.250.0070.08320.53
5.6.240.0130.04020.50
5.6.230.0030.08020.50
5.6.220.0100.08020.54
5.6.210.0030.08720.41
5.6.200.0100.06721.06
5.6.190.0070.05021.09
5.6.180.0070.07721.05
5.6.170.0030.05321.07
5.6.160.0030.05020.96
5.6.150.0030.08020.96
5.6.140.0070.06721.02
5.6.130.0130.07021.07
5.6.120.0070.04721.14
5.6.110.0100.07721.07
5.6.100.0070.08321.01
5.6.90.0100.08021.02
5.6.80.0200.06020.46
5.6.70.0070.06320.39
5.6.60.0070.07720.43
5.6.50.0000.05320.56
5.6.40.0000.04320.33
5.6.30.0000.04320.48
5.6.20.0030.04020.53
5.6.10.0000.04320.43
5.6.00.0070.03720.38
5.5.380.0000.06320.36
5.5.370.0070.03720.31
5.5.360.0030.05020.34
5.5.350.0070.06020.42
5.5.340.0030.06020.88
5.5.330.0000.04720.79
5.5.320.0030.07320.89
5.5.310.0100.06720.75
5.5.300.0100.04320.91
5.5.290.0100.07720.89
5.5.280.0070.06020.83
5.5.270.0130.06020.87
5.5.260.0130.06020.83
5.5.250.0070.08020.68
5.5.240.0170.06720.22
5.5.230.0070.04720.32
5.5.220.0070.08720.18
5.5.210.0030.06020.31
5.5.200.0000.05720.23
5.5.190.0200.04020.16
5.5.180.0000.04320.22
5.5.160.0030.04020.15
5.5.150.0070.03320.28
5.5.140.0070.03720.11
5.5.130.0000.04320.13
5.5.120.0130.05020.23
5.5.110.0070.03720.25
5.5.100.0000.04020.14
5.5.90.0000.04320.07
5.5.80.0030.03720.16
5.5.70.0170.02320.07
5.5.60.0000.04020.07
5.5.50.0030.04019.95
5.5.40.0030.04020.14
5.5.30.0000.03719.93
5.5.20.0030.03720.05
5.5.10.0100.05320.05
5.5.00.0000.03720.05

preferences:
63.19 ms | 400 KiB | 5 Q