3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = array(); // You store some data using some string keys foreach (array('ab', 'cd', '10', 'gh', '24') as $key) { $c[$key] = 1; } // You pass the array $c to some place else and there you do something like foreach ($c as $k => $v) { if ($k === '10') { echo "found"; } }

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.0060.01218.56
8.3.50.0080.01022.11
8.3.40.0070.00718.65
8.3.30.0110.00419.02
8.3.20.0040.00420.29
8.3.10.0000.00821.85
8.3.00.0040.00419.08
8.2.180.0100.01016.38
8.2.170.0140.00722.96
8.2.160.0100.00322.26
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00419.76
8.2.110.0070.00322.14
8.2.100.0040.00819.57
8.2.90.0030.00617.97
8.2.80.0040.00418.16
8.2.70.0000.00817.93
8.2.60.0090.00018.28
8.2.50.0090.00018.10
8.2.40.0080.00021.13
8.2.30.0060.00319.30
8.2.20.0040.00417.80
8.2.10.0040.00418.00
8.2.00.0030.00517.77
8.1.280.0070.01425.92
8.1.270.0090.00619.00
8.1.260.0070.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00422.20
8.1.230.0080.00422.84
8.1.220.0060.00317.93
8.1.210.0030.00618.77
8.1.200.0040.00417.48
8.1.190.0080.00017.13
8.1.180.0060.00318.10
8.1.170.0030.00620.61
8.1.160.0050.00218.95
8.1.150.0040.00418.80
8.1.140.0030.00617.45
8.1.130.0000.00717.74
8.1.120.0050.00317.52
8.1.110.0030.00417.29
8.1.100.0040.00417.44
8.1.90.0000.00717.51
8.1.80.0000.00717.49
8.1.70.0030.00317.34
8.1.60.0000.00817.47
8.1.50.0000.00817.56
8.1.40.0060.00317.53
8.1.30.0030.00617.54
8.1.20.0040.00417.68
8.1.10.0040.00417.55
8.1.00.0040.00417.43
8.0.300.0040.00419.59
8.0.290.0040.00416.75
8.0.280.0000.00818.46
8.0.270.0030.00317.20
8.0.260.0000.00817.31
8.0.250.0050.00217.00
8.0.240.0030.00516.94
8.0.230.0030.00316.89
8.0.220.0070.00016.84
8.0.210.0000.00816.76
8.0.200.0030.00617.02
8.0.190.0000.00816.95
8.0.180.0040.00416.74
8.0.170.0000.00816.98
8.0.160.0050.00316.75
8.0.150.0080.00016.76
8.0.140.0030.00516.85
8.0.130.0050.00013.36
8.0.120.0060.00316.86
8.0.110.0000.00816.84
8.0.100.0080.00016.91
8.0.90.0070.00016.68
8.0.80.0000.01516.82
8.0.70.0040.00416.82
8.0.60.0040.00416.71
8.0.50.0030.00516.79
8.0.30.0110.01317.18
8.0.20.0120.00917.40
8.0.10.0070.00017.08
8.0.00.0060.01116.85
7.4.330.0050.00015.03
7.4.320.0000.00616.53
7.4.300.0030.00316.52
7.4.290.0000.00716.61
7.4.280.0070.00016.57
7.4.270.0070.00016.52
7.4.260.0070.00316.41
7.4.250.0030.00516.48
7.4.240.0010.00616.55
7.4.230.0070.00016.50
7.4.220.0140.00416.50
7.4.210.0120.00316.61
7.4.200.0050.00216.34
7.4.160.0130.00616.45
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0150.00816.51
7.4.120.0060.01116.42
7.4.110.0160.00316.32
7.4.100.0060.01216.44
7.4.90.0070.01316.63
7.4.80.0170.00619.39
7.4.70.0140.00716.46
7.4.60.0090.00916.58
7.4.50.0000.00816.36
7.4.40.0110.00416.49
7.4.30.0140.00716.30
7.4.00.0100.00814.93
7.3.330.0030.00313.23
7.3.320.0000.00613.25
7.3.310.0000.00616.17
7.3.300.0000.00616.37
7.3.290.0040.01016.28
7.3.280.0100.00916.37
7.3.270.0150.00317.40
7.3.260.0000.01716.37
7.3.250.0130.00616.43
7.3.240.0130.01016.32
7.3.230.0050.01116.39
7.3.210.0030.01616.61
7.3.200.0000.01619.39
7.3.190.0060.00916.26
7.3.180.0130.00316.60
7.3.170.0070.01016.41
7.3.160.0130.00316.40
7.3.120.0120.00414.85
7.3.110.0130.00314.58
7.3.100.0070.01014.96
7.3.90.0070.01014.63
7.3.80.0030.01214.86
7.3.70.0070.00714.80
7.3.60.0030.00714.78
7.3.50.0090.00315.03
7.3.40.0030.00614.75
7.3.30.0070.00414.84
7.3.20.0060.00816.78
7.3.10.0100.00316.75
7.3.00.0040.01116.81
7.2.330.0090.00916.63
7.2.320.0060.01216.68
7.2.310.0030.01316.64
7.2.300.0100.01016.74
7.2.290.0140.00516.85
7.2.250.0040.01514.83
7.2.240.0030.01614.93
7.2.230.0090.00914.91
7.2.220.0070.01014.84
7.2.210.0060.00915.06
7.2.200.0100.00714.94
7.2.190.0080.00414.92
7.2.180.0030.01215.07
7.2.170.0030.01215.06
7.2.60.0030.00916.76
7.2.00.0040.01218.75
7.1.330.0070.01016.02
7.1.320.0030.01015.82
7.1.310.0060.00315.89
7.1.300.0060.00615.49
7.1.290.0090.00615.76
7.1.280.0070.00415.63
7.1.270.0030.00915.70
7.1.260.0030.01015.63
7.1.200.0000.01315.54
7.1.100.0030.01018.05
7.1.70.0040.00417.18
7.1.60.0180.00719.22
7.1.50.0040.01116.39
7.1.00.0000.08022.46
7.0.200.0000.00816.89
7.0.140.0000.06322.21
7.0.60.0030.04719.91
7.0.50.0070.08017.80
7.0.40.0070.04720.30
7.0.30.0370.04720.13
7.0.20.0330.07720.09
7.0.10.0030.05020.17
7.0.00.0170.07720.17
5.6.280.0100.06720.99
5.6.210.0170.07020.51
5.6.200.0000.04318.13
5.6.190.0130.07320.61
5.6.180.0270.05020.63
5.6.170.0300.03720.33
5.6.160.0070.08720.45
5.6.150.0100.06318.11
5.6.140.0000.06018.08
5.6.130.0030.04318.11
5.6.120.0070.04021.11
5.6.110.0100.08321.11
5.6.100.0100.07320.99
5.6.90.0270.07321.09
5.6.80.0100.08020.37
5.5.350.0300.06720.33
5.5.340.0070.06718.02
5.5.330.0070.06720.25
5.5.320.0130.05020.07
5.5.310.0330.05720.31
5.5.300.0030.04317.98
5.5.290.0070.08317.98
5.5.280.0070.05720.80
5.5.270.0170.04020.84
5.5.260.0100.08320.72
5.5.250.0100.07020.78
5.5.240.0030.03720.16
5.4.450.0570.05719.61
5.4.440.0170.06719.18
5.4.430.0030.07019.41
5.4.420.0230.05019.32
5.4.410.0200.05019.41
5.4.400.0170.06318.84
5.4.390.0230.04719.19
5.4.380.0230.05318.53
5.4.370.0200.05318.72
5.4.360.0270.04318.74
5.4.350.0070.07318.59
5.4.340.0130.06018.70
5.4.320.0200.07318.49
5.4.310.0230.04718.68
5.4.300.0200.06018.52
5.4.290.0230.04718.59
5.4.280.0330.03718.77
5.4.270.0200.05318.49
5.4.260.0100.05718.64
5.4.250.0270.04718.77
5.4.240.0200.05318.71
5.4.230.0100.05718.69
5.4.220.0230.07018.57
5.4.210.0170.05718.76
5.4.200.0170.05016.66
5.4.190.0330.03718.44
5.4.180.0200.05018.45
5.4.170.0200.05018.61
5.4.160.0330.06018.61
5.4.150.0100.06718.54
5.4.140.0170.06016.28
5.4.130.0200.04316.07
5.4.120.0130.05016.26
5.4.110.0130.05016.16
5.4.100.0270.04016.12
5.4.90.0200.04716.24
5.4.80.0200.04716.29
5.4.70.0030.06316.23
5.4.60.0100.05316.02
5.4.50.0130.05316.19
5.4.40.0130.05316.18
5.4.30.0200.04716.21
5.4.20.0270.04316.13
5.4.10.0100.05716.18
5.4.00.0130.05015.80
5.3.290.0230.06014.55
5.3.280.0130.06014.52
5.3.270.0230.05314.63
5.3.260.0370.06014.51
5.3.250.0100.08314.50
5.3.240.0230.07014.68
5.3.230.0200.06014.60
5.3.220.0270.04714.55
5.3.210.0200.05014.49
5.3.200.0200.05014.54
5.3.190.0100.06014.56
5.3.180.0200.04714.54
5.3.170.0200.05014.45
5.3.160.0170.06314.61
5.3.150.0170.05714.59
5.3.140.0130.05314.52
5.3.130.0170.05314.64
5.3.120.0070.06314.51
5.3.110.0170.05014.52
5.3.100.0030.06314.01
5.3.90.0300.04313.99
5.3.80.0170.05013.95
5.3.70.0130.05313.96
5.3.60.0170.05014.03
5.3.50.0170.05013.89
5.3.40.0100.05713.92
5.3.30.0200.04713.86
5.3.20.0100.05713.64
5.3.10.0200.05013.64
5.3.00.0330.03713.64
5.2.170.0200.03711.09
5.2.160.0130.04011.18
5.2.150.0070.04711.07
5.2.140.0130.05011.05
5.2.130.0070.04711.13
5.2.120.0130.05311.14
5.2.110.0130.05311.05
5.2.100.0200.05011.24
5.2.90.0200.03711.13
5.2.80.0230.05011.15
5.2.70.0200.05311.01
5.2.60.0130.06011.11
5.2.50.0170.03711.02
5.2.40.0130.05710.96
5.2.30.0130.04010.92
5.2.20.0100.04010.89
5.2.10.0030.04710.89
5.2.00.0070.04710.76
5.1.60.0030.04010.00
5.1.50.0070.03710.06
5.1.40.0100.0339.96
5.1.30.0130.03310.43
5.1.20.0130.03710.32
5.1.10.0130.03310.13
5.1.00.0100.03710.08
5.0.50.0100.0308.61
5.0.40.0070.0338.43
5.0.30.0100.0438.24
5.0.20.0070.0278.29
5.0.10.0070.0308.27
5.0.00.0000.0508.18
4.4.90.0100.0175.91
4.4.80.0030.0235.88
4.4.70.0070.0205.88
4.4.60.0100.0175.88
4.4.50.0100.0205.90
4.4.40.0030.0375.87
4.4.30.0030.0305.82
4.4.20.0030.0276.00
4.4.10.0100.0276.00
4.4.00.0130.0305.92
4.3.110.0030.0275.84
4.3.100.0070.0205.80
4.3.90.0070.0205.84
4.3.80.0070.0335.77
4.3.70.0030.0235.86
4.3.60.0030.0235.79
4.3.50.0000.0275.82
4.3.40.0030.0435.79
4.3.30.0030.0234.57
4.3.20.0070.0204.56
4.3.10.0100.0174.48
4.3.00.0070.0237.76

preferences:
49.96 ms | 401 KiB | 5 Q