3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = ['someKey' => 'someValue']; echo $var['someKey']; $wasSet = isset($var['aKey']); if ($wasSet) { echo "was set"; } else { echo "was not set"; } $possibleVar = $var['aKey']; if ($possibleVar) { echo "possible var: $possibleVar"; } else { echo "possible var is false: $possibleVar"; } function testIsSet($arg, $key) { if (isset($arg[$key])) { return $arg[$key]; } return "Default value"; } $retrievedValue = testIsSet($var, 'aKey'); echo "\n\nRetrieved value is $retrievedValue\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)
8.3.40.0150.00018.85
8.3.30.0120.00318.72
8.3.20.0050.00220.16
8.3.10.0030.00523.48
8.3.00.0030.00522.10
8.2.170.0000.01522.96
8.2.160.0100.00719.04
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00019.39
8.2.120.0040.00426.35
8.2.110.0030.00620.36
8.2.100.0120.00018.03
8.2.90.0060.00619.07
8.2.80.0040.00418.04
8.2.70.0000.00817.75
8.2.60.0030.00617.93
8.2.50.0000.00818.10
8.2.40.0040.00420.59
8.2.30.0000.00821.16
8.2.20.0050.00218.05
8.2.10.0020.00518.16
8.2.00.0040.00418.09
8.1.270.0040.00422.14
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00323.83
8.1.230.0110.00019.04
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.13
8.1.190.0100.00017.23
8.1.180.0050.00218.10
8.1.170.0080.00018.59
8.1.160.0050.00218.95
8.1.150.0040.00418.88
8.1.140.0050.00219.58
8.1.130.0030.00318.73
8.1.120.0060.00317.39
8.1.110.0050.00317.20
8.1.100.0040.00417.43
8.1.90.0000.00717.29
8.1.80.0000.00717.35
8.1.70.0050.00317.43
8.1.60.0040.00417.58
8.1.50.0040.00417.55
8.1.40.0050.00317.52
8.1.30.0050.00317.57
8.1.20.0040.00417.64
8.1.10.0060.00317.58
8.1.00.0040.00417.55
8.0.300.0000.00718.77
8.0.290.0080.00016.75
8.0.280.0000.00818.43
8.0.270.0030.00317.17
8.0.260.0030.00316.87
8.0.250.0030.00317.05
8.0.240.0070.00417.05
8.0.230.0000.00716.90
8.0.220.0000.00716.93
8.0.210.0040.00416.98
8.0.200.0030.00316.93
8.0.190.0000.00816.91
8.0.180.0070.00016.80
8.0.170.0000.00817.02
8.0.160.0030.00616.79
8.0.150.0040.00416.73
8.0.140.0020.00516.81
8.0.130.0030.00313.32
8.0.120.0070.00016.95
8.0.110.0050.00316.84
8.0.100.0040.00416.95
8.0.90.0040.00416.82
8.0.80.0060.00916.89
8.0.70.0000.00816.80
8.0.60.0070.00016.86
8.0.50.0030.00316.90
8.0.30.0120.00516.99
8.0.20.0100.00917.40
8.0.10.0050.00317.06
8.0.00.0040.01317.10
7.4.330.0050.00015.55
7.4.320.0030.00316.58
7.4.300.0030.00316.56
7.4.290.0060.00316.48
7.4.280.0060.00316.56
7.4.270.0030.00316.40
7.4.260.0040.00416.57
7.4.250.0000.00716.52
7.4.240.0080.00016.50
7.4.230.0030.00516.47
7.4.220.0070.01016.53
7.4.210.0040.01216.62
7.4.200.0070.00016.70
7.4.160.0100.01116.53
7.4.150.0030.01317.40
7.4.140.0060.01217.86
7.4.130.0110.01116.57
7.4.120.0100.01016.48
7.4.110.0050.01316.50
7.4.100.0030.01316.50
7.4.90.0040.01216.51
7.4.80.0090.00919.39
7.4.70.0130.00316.43
7.4.60.0090.00916.80
7.4.50.0070.01116.63
7.4.40.0100.00616.59
7.4.30.0080.00816.52
7.4.10.0050.01015.57
7.4.00.0040.01115.52
7.3.330.0050.00213.41
7.3.320.0030.00313.29
7.3.310.0000.00916.41
7.3.300.0030.00316.28
7.3.290.0090.00716.37
7.3.280.0090.00916.40
7.3.270.0090.00917.40
7.3.260.0130.00616.41
7.3.250.0110.00916.43
7.3.240.0070.01316.48
7.3.230.0120.00916.41
7.3.210.0080.00916.46
7.3.200.0170.00016.52
7.3.190.0110.00616.64
7.3.180.0070.01016.47
7.3.170.0090.00616.44
7.3.160.0030.01216.57
7.3.130.0070.01015.63
7.3.120.0050.01315.60
7.3.110.0080.00815.57
7.3.100.0090.00715.45
7.3.90.0050.00515.50
7.3.80.0060.00615.74
7.3.70.0090.00415.60
7.3.60.0090.00315.47
7.3.50.0050.01015.64
7.3.40.0100.00715.65
7.3.30.0050.00815.67
7.3.20.0080.00517.50
7.3.10.0050.01217.27
7.3.00.0060.01117.57
7.2.330.0130.00316.62
7.2.320.0120.00616.68
7.2.310.0050.01116.72
7.2.300.0000.01616.75
7.2.290.0140.00616.70
7.2.260.0030.01515.88
7.2.250.0110.00715.76
7.2.240.0110.00615.93
7.2.230.0060.01315.87
7.2.220.0060.01115.69
7.2.210.0090.00615.71
7.2.200.0070.00715.72
7.2.190.0050.00915.66
7.2.180.0040.00815.75
7.2.170.0050.01015.77
7.2.160.0030.01215.78
7.2.150.0130.00517.66
7.2.140.0050.01117.62
7.2.130.0070.01217.68
7.2.120.0110.00917.66
7.2.110.0090.00917.63
7.2.100.0090.00817.56
7.2.90.0170.00717.66
7.2.80.0090.01017.14
7.2.70.0110.00817.46
7.2.60.0110.00717.43
7.2.50.0080.01217.53
7.2.40.0100.00817.69
7.2.30.0140.00317.85
7.2.20.0120.00717.58
7.2.10.0100.00917.63
7.2.00.0080.00818.41
7.1.330.0120.00516.55
7.1.320.0110.00516.64
7.1.310.0070.00516.72
7.1.300.0090.01016.57
7.1.290.0080.00716.70
7.1.280.0070.00816.51
7.1.270.0070.00616.72
7.1.260.0120.00716.56
7.1.250.0110.00516.55
7.1.240.0100.00516.62
7.1.230.0060.01116.65
7.1.220.0050.01216.51
7.1.210.0080.01216.58
7.1.200.0060.01216.34
7.1.190.0080.00916.45
7.1.180.0080.01016.63
7.1.170.0060.01316.63
7.1.160.0070.00916.45
7.1.150.0050.01216.58
7.1.140.0080.00516.70
7.1.130.0080.00516.53
7.1.120.0090.00516.62
7.1.110.0020.01216.60
7.1.100.0060.00817.11
7.1.90.0070.00616.62
7.1.80.0070.01016.64
7.1.70.0130.00516.08
7.1.60.0130.01422.13
7.1.50.0190.00822.04
7.1.40.0190.00821.83
7.1.30.0120.01621.88
7.1.20.0190.00821.93
7.1.10.0080.01215.96
7.1.00.0100.00816.03
7.0.330.0060.01016.07
7.0.320.0150.00316.21
7.0.310.0120.00916.19
7.0.300.0060.01416.20
7.0.290.0100.00816.06
7.0.280.0070.00816.27
7.0.270.0050.00816.19
7.0.260.0060.00516.25
7.0.250.0070.00816.21
7.0.240.0040.01116.17
7.0.230.0030.01316.16
7.0.220.0080.00316.11
7.0.210.0030.00916.17
7.0.200.0090.00915.68
7.0.190.0100.00815.81
7.0.180.0110.00815.61
7.0.170.0140.01215.69
7.0.160.0120.00915.63
7.0.150.0090.00915.65
7.0.140.0110.00815.66
7.0.130.0150.00615.69
7.0.120.0090.00715.69
7.0.110.0110.00615.54
7.0.100.0100.00915.67
7.0.90.0780.01015.67
7.0.80.0090.00915.63
7.0.70.0120.00715.65
7.0.60.0100.00615.51
7.0.50.0090.01015.68
7.0.40.0110.00714.31
7.0.30.0070.01114.54
7.0.20.0120.00714.32
7.0.10.0120.00614.36
7.0.00.0060.01414.36
5.6.400.0040.01315.23
5.6.390.0090.00915.21
5.6.380.0070.01215.09
5.6.370.0130.00815.36
5.6.360.0070.01015.17
5.6.350.0060.00815.33
5.6.340.0050.01015.15
5.6.330.0050.00915.24
5.6.320.0020.01215.37
5.6.310.0020.01414.97
5.6.300.0070.00715.29
5.6.290.0080.00615.10
5.6.280.0070.00715.29
5.6.270.0080.00215.06
5.6.260.0040.01015.27
5.6.250.0030.01415.40
5.6.240.0060.00615.28
5.6.230.0030.01015.20
5.6.220.0050.00715.06
5.6.210.0040.00915.17
5.6.200.0050.00815.09
5.6.190.0060.00715.21
5.6.180.0070.00815.00
5.6.170.0080.00815.20
5.6.160.0040.00915.05
5.6.150.0060.00615.29
5.6.140.0040.01214.98
5.6.130.0050.01115.32
5.6.120.0080.00714.93
5.6.110.0050.00914.97
5.6.100.0110.00315.32
5.6.90.0060.00915.21
5.6.80.0080.00614.86
5.6.70.0050.00915.10
5.6.60.0050.00815.23
5.6.50.0070.00715.15
5.6.40.0070.00915.01
5.6.30.0030.00615.02
5.6.20.0100.00714.99
5.6.10.0080.00715.08
5.6.00.0030.01015.00

preferences:
40.84 ms | 400 KiB | 5 Q