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 = 'bar'; } $thing = new ImmutableThingy; var_dump($thing, $thing->foo); $thing->poo = '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.0090.00618.39
8.3.50.0100.00721.15
8.3.40.0200.00318.90
8.3.30.0000.01418.73
8.3.20.0060.00320.35
8.3.10.0000.00921.85
8.3.00.0050.00323.65
8.2.180.0040.01418.14
8.2.170.0120.00622.96
8.2.160.0160.00320.52
8.2.150.0060.00324.18
8.2.140.0050.00224.66
8.2.130.0000.00820.77
8.2.120.0000.00726.35
8.2.110.0060.00321.13
8.2.100.0030.01017.84
8.2.90.0050.00319.28
8.2.80.0030.00617.97
8.2.70.0040.00417.50
8.2.60.0000.00817.93
8.2.50.0040.00418.10
8.2.40.0050.00322.30
8.2.30.0000.00719.36
8.2.20.0000.00717.66
8.2.10.0070.00018.07
8.2.00.0080.00018.08
8.1.280.0040.01125.92
8.1.270.0040.00422.19
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0090.00023.98
8.1.230.0030.01017.70
8.1.220.0050.00317.75
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0030.00618.71
8.1.160.0000.00720.77
8.1.150.0070.00019.07
8.1.140.0000.00819.50
8.1.130.0070.00017.59
8.1.120.0030.00617.39
8.1.110.0040.00417.43
8.1.100.0070.00017.46
8.1.90.0030.00317.44
8.1.80.0000.00717.42
8.1.70.0040.00417.38
8.1.60.0000.00717.64
8.1.50.0040.00417.53
8.1.40.0000.00817.54
8.1.30.0040.00417.66
8.1.20.0050.00317.62
8.1.10.0040.00417.55
8.1.00.0040.00417.45
8.0.300.0040.00418.77
8.0.290.0090.00016.88
8.0.280.0030.00318.46
8.0.270.0000.00817.27
8.0.260.0000.00617.21
8.0.250.0040.00417.06
8.0.240.0030.00316.92
8.0.230.0000.00717.06
8.0.220.0030.00616.81
8.0.210.0030.00516.98
8.0.200.0030.00317.02
8.0.190.0080.00017.00
8.0.180.0040.00417.00
8.0.170.0040.00416.90
8.0.160.0030.00316.94
8.0.150.0000.00816.93
8.0.140.0070.00016.96
8.0.130.0030.00313.34
8.0.120.0050.00316.82
8.0.110.0040.00416.86
8.0.100.0030.00617.02
8.0.90.0000.00816.79
8.0.80.0030.01116.96
8.0.70.0040.00417.00
8.0.60.0040.00416.85
8.0.50.0000.00716.91
8.0.30.0070.00917.21
8.0.20.0110.00717.40
8.0.10.0040.00417.09
8.0.00.0110.00616.76
7.4.330.0000.00516.77
7.4.320.0000.00616.55
7.4.300.0050.00316.62
7.4.290.0070.00016.43
7.4.280.0050.00316.46
7.4.270.0000.00716.57
7.4.260.0060.00016.57
7.4.250.0040.00416.47
7.4.240.0070.00016.54
7.4.230.0050.00216.51
7.4.220.0110.00716.61
7.4.210.0100.00816.53
7.4.200.0030.00316.67
7.4.160.0140.00316.52
7.4.150.0110.00717.40
7.4.140.0100.01017.86
7.4.130.0130.00616.53
7.4.120.0110.00816.46
7.4.110.0080.00816.56
7.4.100.0070.01416.55
7.4.90.0140.00516.52
7.4.80.0090.00919.39
7.4.70.0030.01316.64
7.4.60.0090.00916.43
7.4.50.0030.01416.34
7.4.40.0120.00416.47
7.4.30.0110.01116.43
7.4.10.0070.01014.85
7.4.00.0100.00614.97
7.3.330.0000.00513.38
7.3.320.0030.00313.29
7.3.310.0000.00716.28
7.3.300.0000.00716.24
7.3.290.0030.00316.39
7.3.280.0070.01016.44
7.3.270.0070.01117.40
7.3.260.0040.01316.43
7.3.250.0100.01016.50
7.3.240.0100.00816.45
7.3.230.0040.01316.47
7.3.210.0090.01316.49
7.3.200.0090.00619.39
7.3.190.0030.01416.28
7.3.180.0100.00716.69
7.3.170.0070.01416.41
7.3.160.0110.01116.55
7.3.130.0060.01314.79
7.3.120.0050.01315.02
7.3.110.0100.00714.84
7.3.100.0080.00614.87
7.3.90.0070.00714.95
7.3.80.0100.00614.84
7.3.70.0110.00714.79
7.3.60.0090.00314.84
7.3.50.0070.00914.79
7.3.40.0050.01014.74
7.3.30.0040.00914.53
7.3.20.0050.01116.83
7.3.10.0070.00316.62
7.3.00.0040.01016.71
7.2.330.0040.01516.45
7.2.320.0140.01016.48
7.2.310.0060.01016.58
7.2.300.0160.00016.66
7.2.290.0190.00316.57
7.2.260.0030.01415.32
7.2.250.0070.01115.14
7.2.240.0070.01214.93
7.2.230.0020.01115.21
7.2.220.0120.00515.19
7.2.210.0070.00714.66
7.2.200.0070.00815.10
7.2.190.0070.00714.99
7.2.180.0090.00815.15
7.2.170.0070.00714.93
7.2.160.0060.00615.16
7.2.150.0000.01016.98
7.2.140.0070.00317.01
7.2.130.0040.00716.98
7.2.120.0070.00716.91
7.2.110.0070.00716.86
7.2.100.0060.00717.05
7.2.90.0030.01316.82
7.2.80.0050.01116.70
7.2.70.0050.00816.72
7.2.60.0060.00916.81
7.2.50.0080.00417.02
7.2.40.0070.00816.81
7.2.30.0050.01016.82
7.2.20.0030.01016.86
7.2.10.0060.00816.82
7.2.00.0050.00917.52
7.1.330.0060.00815.62
7.1.320.0060.00415.80
7.1.310.0060.01115.71
7.1.300.0070.00815.74
7.1.290.0050.00815.85
7.1.280.0030.00615.77
7.1.270.0030.01215.80
7.1.260.0070.00515.80
7.1.250.0040.00915.73
7.1.240.0040.00815.73
7.1.230.0000.01615.70
7.1.220.0030.00715.75
7.1.210.0030.00615.46
7.1.200.0080.00515.88
7.1.190.0060.00915.62
7.1.180.0090.00015.79
7.1.170.0000.01415.88
7.1.160.0090.00615.91
7.1.150.0060.00315.66
7.1.140.0030.00915.79
7.1.130.0060.00315.90
7.1.120.0000.01215.93
7.1.110.0100.00315.94
7.1.100.0030.00817.08
7.1.90.0000.01215.76
7.1.80.0040.01115.76
7.1.70.0000.00816.48
7.1.60.0050.01317.61
7.1.50.0080.00916.38
7.1.40.0040.01115.80
7.1.30.0030.00715.53
7.1.20.0060.00315.56
7.1.10.0030.00615.68
7.1.00.0080.04019.16
7.0.330.0060.00915.31
7.0.320.0070.00715.19
7.0.310.0100.00315.31
7.0.300.0080.00315.50
7.0.290.0000.01315.33
7.0.280.0060.00615.13
7.0.270.0100.00715.41
7.0.260.0070.00715.46
7.0.250.0100.00715.48
7.0.240.0040.00715.21
7.0.230.0040.00815.47
7.0.220.0040.01115.32
7.0.210.0030.01015.60
7.0.200.0100.00715.07
7.0.190.0070.00315.48
7.0.180.0000.01215.20
7.0.170.0000.01415.32
7.0.160.0060.00315.52
7.0.150.0000.01415.44
7.0.140.0000.00915.44
7.0.130.0040.00715.48
7.0.120.0070.00315.28
7.0.110.0070.00315.43
7.0.100.0090.00615.48
7.0.90.0070.00415.26
7.0.80.0080.00615.53
7.0.70.0070.00315.39
7.0.60.0180.03518.50
7.0.50.0080.03816.74
7.0.40.0100.04316.78
7.0.30.0120.04516.82
7.0.20.0080.02616.64
7.0.10.0080.04516.83
7.0.00.0100.03816.73
5.6.400.0040.00414.65
5.6.390.0080.00414.61
5.6.380.0070.00714.46
5.6.370.0090.00614.58
5.6.360.0000.01114.68
5.6.350.0030.01014.17
5.6.340.0000.01114.18
5.6.330.0060.00314.59
5.6.320.0070.00714.52
5.6.310.0100.00314.47
5.6.300.0030.01314.46
5.6.290.0100.00714.61
5.6.280.0030.02117.62
5.6.270.0030.00614.30
5.6.260.0030.01214.75
5.6.250.0060.00614.32
5.6.240.0150.00014.28
5.6.230.0040.00714.38
5.6.220.0030.00914.43
5.6.210.0070.03517.37
5.6.200.0040.02516.40
5.6.190.0030.02617.51
5.6.180.0100.02517.46
5.6.170.0240.03717.44
5.6.160.0100.02017.37
5.6.150.0030.04416.36
5.6.140.0060.04016.37
5.6.130.0080.04216.37
5.6.120.0090.02617.72
5.6.110.0050.04217.69
5.6.100.0030.03217.73
5.6.90.0030.04717.72
5.6.80.0050.04417.27
5.6.70.0080.00414.02
5.6.60.0060.00314.17
5.6.50.0030.00514.16
5.6.40.0040.01114.31
5.6.30.0040.00414.47
5.6.20.0000.00914.22
5.6.10.0060.00914.34
5.6.00.0030.01014.20
5.5.380.0090.00614.20
5.5.370.0070.00414.54
5.5.360.0070.00714.31
5.5.350.0110.03517.36
5.5.340.0070.04016.13
5.5.330.0030.02317.29
5.5.320.0360.03717.29
5.5.310.0200.03917.29
5.5.300.0040.04416.10
5.5.290.0060.04316.13
5.5.280.0040.04517.70
5.5.270.0020.03417.59
5.5.260.0050.04817.31
5.5.250.0120.02717.56
5.5.240.1870.02217.19
5.5.230.0000.01113.94
5.5.220.0040.01114.15
5.5.210.0000.00914.29
5.5.200.0080.00013.90
5.5.190.0100.00313.88
5.5.180.0030.01414.37
5.5.170.0100.00714.18
5.5.160.0060.00614.25
5.5.150.0050.00514.19
5.5.140.0040.00714.28
5.5.130.0040.01114.45
5.5.120.0070.00714.41
5.5.110.0100.00313.89
5.5.100.0030.01314.19
5.5.90.0080.00014.24
5.5.80.0030.01014.20
5.5.70.0030.01014.01
5.5.60.0130.00014.35
5.5.50.0060.00314.39
5.5.40.0080.00413.96
5.5.30.0030.01014.04
5.5.20.0000.01314.24
5.5.10.0090.00314.29
5.5.00.0070.00714.11

preferences:
45.3 ms | 401 KiB | 5 Q