3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allowedAttachmentTypes = '.jpeg,.gif,.png,.jpg,.bmp'; $allowedAttachmentTypes = array_walk( (explode( ',', $allowedAttachmentTypes )), function( $var, $index ) use ( &$allowedAttachmentTypes ) { $allowedAttachmentTypes[ $index ] = preg_replace( '#[\s\.]+#', '', $var ); } ); print_r( $allowedAttachmentTypes );

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.0110.01116.88
8.3.50.0150.00717.36
8.3.40.0100.01018.95
8.3.30.0090.00618.81
8.3.20.0030.00519.15
8.3.10.0040.00420.83
8.3.00.0000.00819.63
8.2.180.0110.00416.88
8.2.170.0070.00722.96
8.2.160.0120.00321.31
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0110.00019.89
8.2.110.0060.00321.11
8.2.100.0040.00818.03
8.2.90.0000.01119.38
8.2.80.0000.00719.39
8.2.70.0030.00517.75
8.2.60.0080.00017.91
8.2.50.0030.00618.07
8.2.40.0060.00318.22
8.2.30.0090.00018.03
8.2.20.0040.00417.82
8.2.10.0030.00517.98
8.2.00.0090.00017.91
8.1.280.0100.00725.92
8.1.270.0040.00424.66
8.1.260.0150.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00720.63
8.1.230.0040.00720.95
8.1.220.0040.00417.79
8.1.210.0050.00318.89
8.1.200.0060.00317.48
8.1.190.0000.00917.41
8.1.180.0040.00418.10
8.1.170.0030.00618.80
8.1.160.0070.00018.98
8.1.150.0040.00418.79
8.1.140.0100.00017.59
8.1.130.0050.00217.80
8.1.120.0050.00217.67
8.1.110.0000.00817.59
8.1.100.0040.00417.46
8.1.90.0040.00417.52
8.1.80.0040.00417.63
8.1.70.0040.00417.64
8.1.60.0030.00517.68
8.1.50.0020.00517.62
8.1.40.0040.00417.57
8.1.30.0000.00817.79
8.1.20.0000.00917.79
8.1.10.0060.00317.65
8.1.00.0040.00417.46
8.0.300.0050.00319.86
8.0.290.0040.00416.75
8.0.280.0030.00318.34
8.0.270.0030.00317.29
8.0.260.0070.00017.10
8.0.250.0040.00417.20
8.0.240.0040.00417.19
8.0.230.0030.00317.15
8.0.220.0070.00016.99
8.0.210.0000.00717.08
8.0.200.0000.00717.13
8.0.190.0030.00517.15
8.0.180.0040.00417.18
8.0.170.0050.00317.10
8.0.160.0050.00317.16
8.0.150.0070.00017.03
8.0.140.0000.00717.04
8.0.130.0060.00013.52
8.0.120.0030.00516.97
8.0.110.0000.00716.92
8.0.100.0070.00017.05
8.0.90.0000.00817.07
8.0.80.0030.01217.13
8.0.70.0040.00417.15
8.0.60.0040.00416.92
8.0.50.0070.00016.95
8.0.30.0120.00917.19
8.0.20.0120.00617.16
8.0.10.0050.00217.07
8.0.00.0050.01317.02
7.4.330.0000.00513.26
7.4.320.0060.00016.73
7.4.300.0000.00716.81
7.4.290.0000.00816.78
7.4.280.0080.00016.71
7.4.270.0000.00716.70
7.4.260.0050.00013.55
7.4.250.0100.00016.81
7.4.240.0030.00416.72
7.4.230.0040.00416.71
7.4.220.0100.01016.67
7.4.210.0070.00916.76
7.4.200.0070.00016.47
7.4.190.0030.00516.90
7.4.160.0160.00616.58
7.4.150.0200.00616.77
7.4.140.0170.01416.78
7.4.130.0120.00916.78
7.4.120.0120.00516.69
7.4.110.0120.00916.87
7.4.100.0080.00816.89
7.4.90.0140.00316.60
7.4.80.0030.01316.75
7.4.70.0110.00716.89
7.4.60.0120.00616.89
7.4.50.0060.00316.52
7.4.40.0120.00416.71
7.4.30.0070.01016.80
7.4.00.0070.00714.96
7.3.330.0000.00713.57
7.3.320.0060.00013.57
7.3.310.0000.00716.38
7.3.300.0080.00016.41
7.3.290.0170.00316.49
7.3.280.0090.01016.52
7.3.270.0210.00616.78
7.3.260.0090.00916.52
7.3.250.0110.00616.75
7.3.240.0070.01016.72
7.3.230.0160.00016.50
7.3.210.0060.01316.93
7.3.200.0150.00919.39
7.3.190.0160.00616.66
7.3.180.0120.00316.54
7.3.170.0200.00316.80
7.3.160.0060.00916.79
7.3.120.0070.01014.93
7.2.330.0100.00716.99
7.2.320.0110.01216.92
7.2.310.0080.01116.83
7.2.300.0040.01616.92
7.2.290.0030.01516.77
7.2.60.0040.01117.20
7.2.00.1000.01317.88
7.1.200.0040.01116.04
7.1.100.0040.01118.44
7.1.70.0000.00917.43
7.1.60.0030.02019.40
7.1.50.0070.02017.30
7.1.00.0000.08022.42
7.0.200.0040.00417.02
7.0.140.0030.07721.95
7.0.60.0070.07719.93
7.0.50.0170.05017.86
7.0.40.0070.08020.11
7.0.30.0170.04320.11
7.0.20.0330.08720.17
7.0.10.0070.05020.18
7.0.00.0070.05020.23
5.6.280.0070.07020.89
5.6.210.0170.07020.50
5.6.200.0070.03718.18
5.6.190.0000.05020.33
5.6.180.0300.07720.46
5.6.170.0170.04020.54
5.6.160.0100.08720.39
5.6.150.0100.05318.16
5.6.140.0100.03718.15
5.6.130.0030.06018.18
5.6.120.0070.08320.96
5.6.110.0070.08321.01
5.6.100.0130.07720.97
5.6.90.0100.08020.98
5.6.80.0130.07320.39
5.5.350.0030.07320.34
5.5.340.0070.05018.02
5.5.330.0000.04320.47
5.5.320.0400.04320.30
5.5.310.0370.07020.37
5.5.300.0070.08017.95
5.5.290.0100.04317.96
5.5.280.0070.08320.90
5.5.270.0030.09020.96
5.5.260.0030.05020.87
5.5.250.0000.08720.55
5.5.240.3700.03720.24
5.4.450.0070.04019.20
5.4.440.0130.07019.57
5.4.430.0100.04319.56
5.4.420.0030.07019.19
5.4.410.0070.07719.34
5.4.400.0100.08019.16
5.4.390.0000.04318.92
5.4.380.0030.05019.12
5.4.370.0100.05719.21
5.4.360.0100.07018.88
5.4.350.0100.03319.15
5.4.340.0000.06019.14
5.4.320.0100.06319.00
5.4.310.0070.04319.24
5.4.300.0030.04719.07
5.4.290.0070.07319.14
5.4.280.0030.07719.14
5.4.270.0030.04019.14
5.4.260.0100.06719.22
5.4.250.0130.06318.89
5.4.240.0100.07019.20
5.4.230.0100.04319.14
5.4.220.0030.08319.23
5.4.210.0070.07019.14
5.4.200.0130.07319.23
5.4.190.0000.05319.11
5.4.180.0070.04019.23
5.4.170.0170.07018.84
5.4.160.0070.06019.05
5.4.150.0070.08018.82
5.4.140.0130.07316.43
5.4.130.0070.07316.45
5.4.120.0030.04316.50
5.4.110.0130.07016.53
5.4.100.0000.06316.43
5.4.90.0070.03316.39
5.4.80.0070.07016.34
5.4.70.0030.05716.54
5.4.60.0130.06016.40
5.4.50.0100.07316.27
5.4.40.0070.05016.45
5.4.30.0030.04716.39
5.4.20.0070.07016.42
5.4.10.0070.04316.44
5.4.00.0000.05715.86
5.3.290.0130.07014.69
5.3.280.0030.03714.61
5.3.270.0100.05714.66
5.3.260.0100.05014.63
5.3.250.0170.07314.62
5.3.240.0030.05014.62
5.3.230.0070.04714.62
5.3.220.0070.04014.72
5.3.210.0070.07014.72
5.3.200.0030.07314.55
5.3.190.0000.04314.59
5.3.180.0030.03714.71
5.3.170.0030.04014.70
5.3.160.0070.07314.56
5.3.150.0100.07014.63
5.3.140.0130.07014.55
5.3.130.0030.04714.54
5.3.120.0100.07014.57
5.3.110.0000.06314.57
5.3.100.0070.04014.05
5.3.90.0070.05013.94
5.3.80.0000.07013.94
5.3.70.0030.04713.98
5.3.60.0100.06714.17
5.3.50.0000.04313.87
5.3.40.0070.04013.95
5.3.30.0070.06013.96
5.3.20.0030.06313.71
5.3.10.0070.04313.69
5.3.00.0070.06713.79
5.2.170.0070.03011.07
5.2.160.0070.05311.15
5.2.150.0070.05311.04
5.2.140.0030.06311.30
5.2.130.0100.05311.00
5.2.120.0070.04711.26
5.2.110.0070.03311.18
5.2.100.0000.06011.04
5.2.90.0000.03311.00
5.2.80.0070.05710.92
5.2.70.0030.07011.07
5.2.60.0100.03010.89
5.2.50.0000.05011.10
5.2.40.0030.06710.92
5.2.30.0030.03310.88
5.2.20.0030.03310.85
5.2.10.0070.02710.94
5.2.00.0030.06010.87
5.1.60.0030.05310.05
5.1.50.0000.05710.14
5.1.40.0070.0509.95
5.1.30.0070.04010.19
5.1.20.0030.03010.30
5.1.10.0030.03010.08
5.1.00.0070.0279.97
5.0.50.0030.0438.91
5.0.40.0000.0508.91
5.0.30.0030.0308.91
5.0.20.0000.0408.91
5.0.10.0030.0438.91
5.0.00.0000.0338.91
4.4.90.0000.0238.91
4.4.80.0030.0338.91
4.4.70.0070.0378.91
4.4.60.0000.0208.91
4.4.50.0030.0138.91
4.4.40.0000.0308.91
4.4.30.0000.0238.91
4.4.20.0030.0238.91
4.4.10.0000.0408.91
4.4.00.0030.0538.91
4.3.110.0030.0238.91
4.3.100.0070.0338.91
4.3.90.0030.0208.91
4.3.80.0000.0308.91
4.3.70.0030.0308.91
4.3.60.0030.0308.91
4.3.50.0000.0278.91
4.3.40.0030.0508.91
4.3.30.0000.0308.91
4.3.20.0000.0338.91
4.3.10.0030.0338.91
4.3.00.0030.0338.91

preferences:
51.7 ms | 400 KiB | 5 Q