3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NonExistant { protected $associativeArray = array( 'one' => 'one', 'two' => 'two', 'three' => 'three', 'four' => 'four', 'five' => 'five', 'six' => 'six', ); protected $numIterations = 1000; public function issetTest() { for ($i = 0; $i < $this->numIterations; $i++) { isset($this->associativeArray['none']); } } public function arrayKeyExistsTest() { for ($i = 0; $i < $this->numIterations; $i++) { array_key_exists('none', $this->associativeArray); } } } $class = new NonExistant(); foreach (array('issetTest', 'arrayKeyExistsTest') as $func) { $time_start = microtime(); $class->$func(); $time_end = microtime(); $time = $time_end - $time_start; echo "Did $func in $time seconds\n"; }

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)
7.4.00.0080.00815.12
7.3.120.0110.00714.86
7.3.110.0050.01214.72
7.3.100.0080.00915.03
7.3.90.0080.00514.81
7.3.80.0050.01214.90
7.3.70.0070.00914.94
7.3.60.0020.01114.76
7.3.50.0080.00714.76
7.3.40.0060.01014.76
7.3.30.0090.00514.71
7.3.20.0090.00716.66
7.3.10.0060.00916.70
7.3.00.0050.00816.80
7.2.250.0100.00814.86
7.2.240.0070.01115.08
7.2.230.0080.00815.04
7.2.220.0080.00815.12
7.2.210.0080.00415.15
7.2.200.0050.01015.19
7.2.190.0070.00814.98
7.2.180.0070.00915.17
7.2.170.0060.01015.01
7.2.160.0030.01015.17
7.2.150.0130.00316.80
7.2.140.0090.00616.98
7.2.130.0070.00516.94
7.2.120.0040.01116.93
7.2.110.0040.00916.88
7.2.100.0070.00716.91
7.2.90.0060.00916.92
7.2.80.0090.00916.76
7.2.70.0030.01216.96
7.2.60.0090.00616.68
7.2.50.0050.00816.78
7.2.40.0050.00916.88
7.2.30.0100.00416.89
7.2.20.0060.00917.03
7.2.10.0080.00816.98
7.2.00.0060.01017.61
7.1.330.0050.01115.71
7.1.320.0040.00815.81
7.1.310.0060.00815.83
7.1.300.0030.00615.60
7.1.290.0070.00715.71
7.1.280.0050.01015.79
7.1.270.0060.00815.86
7.1.260.0070.00815.96
7.1.250.0090.00615.87
7.1.240.0030.01215.89
7.1.230.0020.01115.84
7.1.220.0080.00615.65
7.1.210.0110.00515.76
7.1.200.0080.01015.88
7.1.190.0000.01115.74
7.1.180.0080.00715.78
7.1.170.0040.00915.93
7.1.160.0060.00415.76
7.1.150.0050.00615.59
7.1.140.0050.00915.82
7.1.130.0060.00415.88
7.1.120.0080.00615.70
7.1.110.0100.00415.75
7.1.100.0100.00315.78
7.1.90.0080.00715.53
7.1.80.0050.00515.70
7.1.70.0100.00716.11
7.1.60.0050.01117.09
7.1.50.0070.00715.98
7.1.40.0060.00615.74
7.1.30.0120.00215.69
7.1.20.0070.00815.77
7.1.10.0070.00615.63
7.1.00.0030.03217.90
7.0.330.0110.00815.40
7.0.320.0080.00715.19
7.0.310.0030.00815.38
7.0.300.0070.00515.37
7.0.290.0030.00915.31
7.0.280.0030.00915.15
7.0.270.0050.01015.43
7.0.260.0080.00615.39
7.0.250.0080.00615.14
7.0.240.0070.00715.24
7.0.230.0080.00715.26
7.0.220.0070.00715.06
7.0.210.0020.00915.23
7.0.200.0040.00815.84
7.0.190.0020.01115.26
7.0.180.0040.01115.27
7.0.170.0070.00615.44
7.0.160.0040.01015.36
7.0.150.0090.00615.30
7.0.140.0040.03017.58
7.0.130.0020.01115.41
7.0.120.0030.01115.20
7.0.110.0090.00615.54
7.0.100.0080.00515.48
7.0.90.0080.00515.21
7.0.80.0060.00515.45
7.0.70.0060.00815.44
7.0.60.0050.03216.96
7.0.50.0080.02916.30
7.0.40.0040.02115.92
7.0.30.0170.02915.84
7.0.20.0120.03015.86
7.0.10.0060.03315.91
7.0.00.0070.01715.86
5.6.400.0100.01014.61
5.6.390.0130.00614.66
5.6.380.0070.00714.15
5.6.370.0030.01014.21
5.6.360.0030.00714.24
5.6.350.0050.00814.50
5.6.340.0040.00914.29
5.6.330.0090.00614.39
5.6.320.0100.00514.23
5.6.310.0080.00514.24
5.6.300.0070.00814.33
5.6.290.0050.00714.47
5.6.280.0030.03116.58
5.6.270.0030.01014.55
5.6.260.0060.00814.37
5.6.250.0030.01414.28
5.6.240.0090.00814.16
5.6.230.0050.00914.33
5.6.220.0040.00914.31
5.6.210.0120.02516.44
5.6.200.0080.02315.62
5.6.190.0030.03116.28
5.6.180.0130.02016.41
5.6.170.0140.03016.34
5.6.160.0060.02616.39
5.6.150.0050.01915.45
5.6.140.0080.03215.57
5.6.130.0080.02215.65
5.6.120.0050.02616.58
5.6.110.0080.03016.67
5.6.100.0040.02016.50
5.6.90.0080.03216.51
5.6.80.0110.02416.30
5.6.70.0030.01013.99
5.6.60.0100.00314.17
5.6.50.0030.00914.34
5.6.40.0050.01114.02
5.6.30.0030.01014.19
5.6.20.0070.00914.28
5.6.10.0060.00414.19
5.6.00.0090.00614.20
5.5.380.0030.00812.60
5.5.370.0070.00712.68
5.5.360.0070.00712.86
5.5.350.0150.03015.25
5.5.340.0080.02214.49
5.5.330.0040.02915.20
5.5.320.0080.03215.15
5.5.310.0160.02915.23
5.5.300.0080.02214.50
5.5.290.0050.02914.37
5.5.280.0030.03315.32
5.5.270.0020.03615.44
5.5.260.0030.03715.40
5.5.250.0050.01815.28
5.5.240.0080.02815.22
5.5.230.0050.00912.40
5.5.220.0030.00912.49
5.5.210.0040.00812.65
5.5.200.0020.01212.51
5.5.190.0020.01212.46
5.5.180.0040.00912.56
5.5.170.0080.00612.69
5.5.160.0050.00812.73
5.5.150.0070.00512.68
5.5.140.0040.00912.70
5.5.130.0050.00812.47
5.5.120.0090.00312.58
5.5.110.0040.00712.62
5.5.100.0080.00712.69
5.5.90.0090.00112.71
5.5.80.0110.00112.63
5.5.70.0040.00812.65
5.5.60.0080.00512.70
5.5.50.0090.00512.56
5.5.40.0030.01012.65
5.5.30.0070.00512.48
5.5.20.0080.00312.71
5.5.10.0030.00712.73
5.5.00.0020.01212.74
5.4.450.0150.01914.77
5.4.440.0140.01914.83
5.4.430.0230.01414.86
5.4.420.0220.02314.76
5.4.410.0110.02014.84
5.4.400.0220.01914.82
5.4.390.0250.02114.76
5.4.380.0150.02314.52
5.4.370.0100.02514.49
5.4.360.0130.02514.60
5.4.350.0140.02114.60
5.4.340.0090.02314.63
5.4.330.0000.01012.72
5.4.320.0040.01712.54
5.4.310.0030.02012.46
5.4.300.0050.01612.48
5.4.290.0080.01812.52
5.4.280.0050.01712.46
5.4.270.0080.01512.45
5.4.260.0040.01712.49
5.4.250.0030.01912.52
5.4.240.0030.01712.48
5.4.230.0060.01712.43
5.4.220.0050.01712.46
5.4.210.0030.01812.42
5.4.200.0070.01712.49
5.4.190.0030.01912.58
5.4.180.0060.01512.39
5.4.170.0050.01512.36
5.4.160.0070.01312.49
5.4.150.0030.01812.39
5.4.140.0050.01712.43
5.4.130.0060.01612.44
5.4.120.0070.01412.38
5.4.110.0060.01512.28
5.4.100.0050.01512.24
5.4.90.0080.01212.33
5.4.80.0050.01612.32
5.4.70.0030.02012.31
5.4.60.0060.01612.37
5.4.50.0030.01712.39
5.4.40.0020.02212.40
5.4.30.0020.02012.42
5.4.20.0020.01912.42
5.4.10.0040.01912.44
5.4.00.0030.01812.22
5.3.290.0080.02111.63
5.3.280.0060.02111.62
5.3.270.0030.02311.70
5.3.260.0030.02611.66
5.3.250.0050.02111.52
5.3.240.0040.02511.59
5.3.230.0060.02111.63
5.3.220.0050.02511.57
5.3.210.0070.02511.57
5.3.200.0040.02111.53
5.3.190.0040.02211.59
5.3.180.0050.02611.65
5.3.170.0030.02311.65
5.3.160.0050.02311.65
5.3.150.0040.02411.67
5.3.140.0060.02111.62
5.3.130.0050.02211.55
5.3.120.0020.02611.62
5.3.110.0040.02411.62
5.3.100.0080.02111.39
5.3.90.0060.02511.38
5.3.80.0040.02211.30
5.3.70.0060.02211.18
5.3.60.0040.02311.36
5.3.50.0050.02011.17
5.3.40.0030.02511.17
5.3.30.0070.01911.34
5.3.20.0060.02311.12
5.3.10.0050.01911.03
5.3.00.0060.02510.99
5.2.170.0050.0249.74
5.2.160.0060.0219.74
5.2.150.0050.0189.74
5.2.140.0050.0199.74
5.2.130.0060.0209.72
5.2.120.0040.0179.72
5.2.110.0040.0179.72
5.2.100.0040.0209.72
5.2.90.0040.0199.72
5.2.80.0040.0199.72
5.2.70.0040.0169.72
5.2.60.0010.0209.70
5.2.50.0060.0169.68
5.2.40.0020.0189.67
5.2.30.0010.0229.66
5.2.20.0070.0169.65
5.2.10.0030.0229.61
5.2.00.0040.0219.54
5.1.60.0030.0219.19
5.1.50.0040.0179.19
5.1.40.0050.0199.17
5.1.30.0020.0209.35
5.1.20.0060.0199.36
5.1.10.0050.0189.22
5.1.00.0040.0219.22
5.0.50.0050.0168.46
5.0.40.0030.0188.39
5.0.30.0020.0208.30
5.0.20.0040.0128.29
5.0.10.0020.0148.28
5.0.00.0020.0188.27
4.4.90.0020.0087.52
4.4.80.0010.0107.50
4.4.70.0030.0087.50
4.4.60.0010.0117.50
4.4.50.0020.0107.51
4.4.40.0020.0167.48
4.4.30.0010.0127.51
4.4.20.0040.0087.55
4.4.10.0040.0097.55
4.4.00.0010.0157.51
4.3.110.0020.0097.46
4.3.100.0020.0107.46
4.3.90.0020.0117.44
4.3.80.0040.0117.42
4.3.70.0030.0097.44
4.3.60.0020.0097.44
4.3.50.0010.0107.44
4.3.40.0020.0147.39
4.3.30.0010.0126.78
4.3.20.0020.0096.77
4.3.10.0010.0096.74
4.3.00.0050.00812.96

preferences:
33.18 ms | 401 KiB | 5 Q