3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class CanNotSetProperties extends RuntimeException { public function __construct() { parent::__construct("You can not set properties on Immutable objects."); } } final class ConstructorIsVisible extends RuntimeException { public function __construct() { parent::__construct("Immutable objects can not expose the constructor."); } } final class CanNotBeCloned extends RuntimeException { public function __construct() { parent::__construct("Immutable objects can not be cloned."); } } trait Immutable { final public function __set($property, $value) { throw new CanNotSetProperties; } final public function __clone() { throw new CanNotBeCloned; } final private function __construct() { throw new ConstructorIsVisible; } } final class Test { use Immutable; } $test = new Test; $test->__construct();

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.00316.63
8.3.50.0130.01022.10
8.3.40.0110.01118.82
8.3.30.0120.00319.21
8.3.20.0040.00420.37
8.3.10.0090.00921.70
8.3.00.0110.00018.98
8.2.180.0140.00418.54
8.2.170.0040.01422.96
8.2.160.0100.01022.26
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0060.00326.16
8.2.120.0070.00719.83
8.2.110.0030.00622.24
8.2.100.0040.00818.09
8.2.90.0050.00319.27
8.2.80.0050.00317.97
8.2.70.0030.00617.47
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0090.00020.07
8.2.30.0080.00018.05
8.2.20.0040.00417.75
8.2.10.0040.00417.93
8.2.00.0040.00417.68
8.1.280.0040.01125.92
8.1.270.0160.00319.02
8.1.260.0030.01426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.80
8.1.230.0040.00719.09
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0030.00617.23
8.1.190.0080.00017.10
8.1.180.0050.00318.10
8.1.170.0050.00318.50
8.1.160.0070.00022.02
8.1.150.0000.00718.80
8.1.140.0040.00419.08
8.1.130.0030.00317.77
8.1.120.0040.00417.35
8.1.110.0000.00817.44
8.1.100.0080.00017.44
8.1.90.0060.00317.40
8.1.80.0030.00317.36
8.1.70.0080.00017.41
8.1.60.0000.00917.56
8.1.50.0040.00417.45
8.1.40.0000.00817.46
8.1.30.0040.00417.52
8.1.20.0000.00817.50
8.1.10.0000.00717.38
8.1.00.0000.00817.35
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0030.00318.51
8.0.270.0000.00717.21
8.0.260.0050.00217.18
8.0.250.0000.00717.02
8.0.240.0040.00417.05
8.0.230.0000.00717.06
8.0.220.0000.00716.95
8.0.210.0030.00316.95
8.0.200.0000.00617.07
8.0.190.0000.00717.01
8.0.180.0000.00716.92
8.0.170.0030.00616.96
8.0.160.0000.00816.95
8.0.150.0030.00316.85
8.0.140.0000.00816.80
8.0.130.0030.00313.43
8.0.120.0030.00516.96
8.0.110.0030.00516.94
8.0.100.0040.00416.94
8.0.90.0000.00716.76
8.0.80.0040.01216.89
8.0.70.0050.00216.96
8.0.60.0000.00716.99
8.0.50.0070.00016.84
8.0.30.0130.00817.08
8.0.20.0150.00817.40
8.0.10.0040.00416.91
8.0.00.0100.00916.61
7.4.330.0000.00815.03
7.4.320.0000.00616.53
7.4.300.0000.00616.57
7.4.290.0000.00716.47
7.4.280.0070.00016.34
7.4.270.0040.00416.35
7.4.260.0000.00716.36
7.4.250.0030.00616.31
7.4.240.0000.00716.54
7.4.230.0030.00316.57
7.4.220.0040.01316.35
7.4.210.0070.01116.62
7.4.200.0000.00716.62
7.4.160.0100.00716.43
7.4.150.0080.01117.40
7.4.140.0110.00917.86
7.4.130.0080.00816.50
7.4.120.0110.00516.46
7.4.110.0100.00716.51
7.4.100.0100.01416.56
7.4.90.0110.00616.52
7.4.80.0070.01116.70
7.4.70.0040.01516.45
7.4.60.0090.01016.43
7.4.50.0030.00516.44
7.4.40.0090.01216.67
7.4.30.0160.00616.63
7.4.10.0070.01014.73
7.4.00.0080.00914.94
7.3.330.0030.00313.05
7.3.320.0040.00813.39
7.3.310.0000.00816.29
7.3.300.0000.00716.32
7.3.290.0040.00416.17
7.3.280.0090.01016.30
7.3.270.0090.00917.40
7.3.260.0120.01216.45
7.3.250.0050.01216.36
7.3.240.0100.00616.38
7.3.230.0040.01516.48
7.3.210.0000.01716.35
7.3.200.0160.00319.39
7.3.190.0090.00616.36
7.3.180.0040.01816.21
7.3.170.0090.00916.38
7.3.160.0070.01016.46
7.3.130.0070.01114.85
7.3.120.0030.01614.93
7.3.110.0060.00914.67
7.3.100.0100.00714.91
7.3.90.0040.01114.63
7.3.80.0110.00314.78
7.3.70.0040.01114.79
7.3.60.0080.00614.80
7.3.50.0030.00614.87
7.3.40.0090.00314.75
7.3.30.0000.00914.77
7.3.20.0070.00716.68
7.3.10.0080.00716.66
7.3.00.0030.00916.45
7.2.330.0090.00916.48
7.2.320.0080.00916.38
7.2.310.0040.01516.73
7.2.300.0160.00616.67
7.2.290.0060.01116.29
7.2.260.0000.01314.84
7.2.250.0040.01214.84
7.2.240.0060.00915.17
7.2.230.0110.00615.07
7.2.220.0040.01114.69
7.2.210.0030.00914.77
7.2.200.0030.01214.93
7.2.190.0050.00514.85
7.2.180.0040.00814.93
7.2.170.0040.01114.97
7.2.160.0000.01114.82
7.2.150.0000.01516.61
7.2.140.0040.01116.87
7.2.130.0080.00816.80
7.2.120.0110.00616.52
7.2.110.0080.00816.84
7.2.100.0030.00816.70
7.2.90.0050.01416.84
7.2.80.0080.00816.68
7.2.70.0050.01016.58
7.2.60.0060.00716.68
7.2.50.0060.01016.44
7.2.40.0060.00616.82
7.2.30.0020.01216.84
7.2.20.0040.01216.74
7.2.10.0050.00916.74
7.2.00.0040.01117.70
7.1.330.0030.01015.78
7.1.320.0040.01115.38
7.1.310.0030.00715.60
7.1.300.0110.00315.37
7.1.290.0070.00315.75
7.1.280.0040.00715.73
7.1.270.0070.01015.71
7.1.260.0090.00315.57
7.1.250.0050.00815.57
7.1.240.0100.00315.73
7.1.230.0060.00315.71
7.1.220.0090.00315.45
7.1.210.0030.01615.64
7.1.200.0040.00815.60
7.1.190.0080.00815.82
7.1.180.0120.00415.56
7.1.170.0050.00515.73
7.1.160.0070.01015.43
7.1.150.0040.01115.73
7.1.140.0060.00315.81
7.1.130.0130.00315.56
7.1.120.0030.00715.45
7.1.110.0060.00815.47
7.1.100.0060.00616.78
7.1.90.0110.00315.44
7.1.80.0030.01415.78
7.1.70.0020.01116.33
7.1.60.0090.00917.54
7.1.50.0040.00916.24
7.1.40.0030.01315.42
7.1.30.0100.00015.55
7.1.20.0040.00715.40
7.1.10.0040.00815.75
7.1.00.0120.03418.99
7.0.330.0040.00714.95
7.0.320.0000.01115.22
7.0.310.0070.01015.12
7.0.300.0070.01015.16
7.0.290.0040.00815.12
7.0.280.0060.00915.25
7.0.270.0030.00715.39
7.0.260.0030.00615.48
7.0.250.0100.00315.48
7.0.240.0090.00315.22
7.0.230.0090.00615.39
7.0.220.0040.00815.23
7.0.210.0040.00715.48
7.0.200.0760.01314.89
7.0.190.0040.00815.44
7.0.180.0030.01015.40
7.0.170.0060.00915.52
7.0.160.0070.00715.49
7.0.150.0050.00515.14
7.0.140.0030.03718.74
7.0.130.0030.00615.07
7.0.120.0040.00815.34
7.0.110.0070.00415.37
7.0.100.0090.00315.29
7.0.90.0000.01415.25
7.0.80.0030.01015.32
7.0.70.0000.00815.31
7.0.60.0060.03417.66
7.0.50.0030.02416.63
7.0.40.0060.02316.71
7.0.30.0170.04516.73
7.0.20.0120.02316.80
7.0.10.0050.04816.85
7.0.00.0070.03816.63
5.6.400.0090.00014.13
5.6.390.0130.00314.27
5.6.380.0070.01014.07
5.6.370.0000.01414.43
5.6.360.0000.01414.33
5.6.350.0100.00014.05
5.6.340.0040.01214.16
5.6.330.0080.00614.22
5.6.320.0030.01013.93
5.6.310.0120.00014.19
5.6.300.0030.00714.11
5.6.290.0060.01014.41
5.6.280.0080.03617.73
5.6.270.0060.00814.34
5.6.260.0100.00313.97
5.6.250.0070.00714.49
5.6.240.0030.01314.03
5.6.230.0030.01014.36
5.6.220.0040.01114.02
5.6.210.0080.02817.52
5.6.200.0060.02016.25
5.6.190.0030.02617.46
5.6.180.0230.03017.27
5.6.170.0100.03017.34
5.6.160.0110.03917.36
5.6.150.0070.04416.31
5.6.140.0020.02616.12
5.6.130.0030.02316.31
5.6.120.0070.02417.64
5.6.110.0080.04217.71
5.6.100.0100.04317.62
5.6.90.0070.03617.59
5.6.80.0010.02317.34
5.6.70.0060.00614.12
5.6.60.0080.00513.99
5.6.50.0030.01014.08
5.6.40.0110.00314.25
5.6.30.0030.00714.37
5.6.20.0110.00414.21
5.6.10.0040.00814.04
5.6.00.0050.00514.16
5.5.380.0060.00613.93
5.5.370.0000.00914.19
5.5.360.0030.00914.11
5.5.350.0150.04717.24
5.5.340.0050.03816.05
5.5.330.0070.04717.25
5.5.320.0070.03517.29
5.5.310.0210.02517.27
5.5.300.0030.02516.05
5.5.290.0020.03016.08
5.5.280.0030.02517.60
5.5.270.0080.04317.46
5.5.260.0160.03217.59
5.5.250.0030.02517.46
5.5.240.0090.04317.13
5.5.230.0000.01314.05
5.5.220.0060.00814.04
5.5.210.0040.01114.00
5.5.200.0090.00614.11
5.5.190.0040.00814.13
5.5.180.0070.00714.27
5.5.170.0040.01013.98
5.5.160.0110.00314.13
5.5.150.0070.00713.96
5.5.140.0030.00914.31
5.5.130.0110.00314.21
5.5.120.0000.01414.01
5.5.110.0030.01014.12
5.5.100.0000.01114.00
5.5.90.0100.00314.07
5.5.80.0070.00714.13
5.5.70.0000.01313.98
5.5.60.0050.00314.13
5.5.50.0070.00713.93
5.5.40.0060.01313.99
5.5.30.0000.01414.33
5.5.20.0090.00913.85
5.5.10.0000.00914.12
5.5.00.0060.00613.83
5.4.450.0210.02815.20
5.4.440.0500.03615.27
5.4.430.0100.03115.01
5.4.420.0500.03715.18
5.4.410.0550.02715.05
5.4.400.0170.02614.95
5.4.390.0130.02614.92
5.4.380.0100.03314.83
5.4.370.0100.02814.71
5.4.360.0130.03014.69
5.4.350.0080.02714.75
5.4.340.0000.03514.71
5.4.330.0060.00310.76
5.4.320.0120.02614.73
5.4.310.0080.02614.87
5.4.300.0080.02814.74
5.4.290.0120.03114.93
5.4.280.0100.03614.79
5.4.270.0030.03514.78
5.4.260.0130.02614.96
5.4.250.0120.03914.85
5.4.240.0110.03114.79
5.4.230.0140.02714.54
5.4.220.0070.03414.65
5.4.210.0080.03214.89
5.4.200.0160.03213.93
5.4.190.0070.03314.64
5.4.180.0050.03214.79
5.4.170.0100.03214.69
5.4.160.0080.03214.82
5.4.150.0170.02414.80
5.4.140.0130.03013.68
5.4.130.0080.02913.44
5.4.120.0100.03213.67
5.4.110.0100.02513.63
5.4.100.0070.03513.53
5.4.90.0030.03213.68
5.4.80.0060.02913.70
5.4.70.0220.02813.63
5.4.60.0070.03313.71
5.4.50.0180.02013.46
5.4.40.0060.03013.68
5.4.30.0180.02513.65
5.4.20.0100.03013.65
5.4.10.0180.03013.62
5.4.00.0080.02713.20
5.3.290.0170.06014.73
5.3.280.0170.05014.67
5.3.270.0200.05314.62
5.3.260.0170.05014.73
5.3.250.0100.05714.84
5.3.240.0200.05314.62
5.3.230.0270.06014.66
5.3.220.0030.07014.70
5.3.210.0230.05014.80
5.3.200.0270.04714.61
5.3.190.0200.05014.57
5.3.180.0130.05714.80
5.3.170.0170.06014.80
5.3.160.0270.04714.60
5.3.150.0100.06014.59
5.3.140.0070.06314.62
5.3.130.0100.06014.62
5.3.120.0130.05714.77
5.3.110.0200.05714.77
5.3.100.0170.05714.10
5.3.90.0100.06014.18
5.3.80.0300.03714.04
5.3.70.0100.05314.14
5.3.60.0230.04714.04
5.3.50.0100.05314.09
5.3.40.0170.04714.17
5.3.30.0100.05313.97
5.3.20.0100.05013.71
5.3.10.0170.04313.73
5.3.00.0170.05313.68
5.2.170.0100.04311.29
5.2.160.0100.04711.20
5.2.150.0130.06011.29
5.2.140.0230.05011.26
5.2.130.0130.05711.22
5.2.120.0070.04311.16
5.2.110.0200.03311.14
5.2.100.0200.03011.32
5.2.90.0070.04311.24
5.2.80.0100.04311.13
5.2.70.0130.04011.09
5.2.60.0030.05011.16
5.2.50.0100.04311.03
5.2.40.0130.03711.02
5.2.30.0030.04711.05
5.2.20.0100.04011.08
5.2.10.0100.04010.86
5.2.00.0170.03310.78
5.1.60.0030.04010.14
5.1.50.0070.04010.11
5.1.40.0070.03710.06
5.1.30.0200.03710.35
5.1.20.0070.04010.59
5.1.10.0070.03710.12
5.1.00.0030.04010.26
5.0.50.0100.0278.64
5.0.40.0130.0208.52
5.0.30.0130.0378.25
5.0.20.0130.0208.23
5.0.10.0000.0338.29
5.0.00.0030.0478.15
4.4.90.0070.0207.58
4.4.80.0030.0237.58
4.4.70.0030.0237.58
4.4.60.0030.0237.58
4.4.50.0070.0207.58
4.4.40.0000.0407.58
4.4.30.0070.0207.58
4.4.20.0000.0277.58
4.4.10.0070.0207.58
4.4.00.0030.0337.58
4.3.110.0070.0207.58
4.3.100.0030.0207.58
4.3.90.0000.0277.58
4.3.80.0070.0337.58
4.3.70.0070.0177.58
4.3.60.0030.0307.58
4.3.50.0100.0177.58
4.3.40.0000.0377.58
4.3.30.0030.0207.58
4.3.20.0030.0207.58
4.3.10.0030.0237.58
4.3.00.0030.02014.62

preferences:
53.89 ms | 401 KiB | 5 Q