3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrayOfString = array( 'customer service[-3] technical support[-3]', 'picture quality[+2]feature[+2]', 'smell[-2]', 'player[+2]', 'player[-3][u]', 'dvd player[-2]', 'player[+2][p]', 'format[+2][u]progressive scan[-2]' ); preg_match_all("/([\w ]+[^[]]*)\[([+-]\d*?)\]/", implode(",", $arrayOfString) , $matches); print_r(array_combine($matches[1], array_filter($matches[2], 'trim')));

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.0190.00018.43
8.3.50.0070.01322.17
8.3.40.0110.00719.00
8.3.30.0030.01020.34
8.3.20.0050.00320.30
8.3.10.0040.00422.09
8.3.00.0000.00822.46
8.2.180.0070.01416.63
8.2.170.0000.01422.96
8.2.160.0070.00722.25
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.89
8.2.110.0060.00322.20
8.2.100.0040.00817.91
8.2.90.0000.00819.30
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0050.00318.03
8.2.50.0030.00518.07
8.2.40.0050.00320.01
8.2.30.0000.00718.14
8.2.20.0000.00817.79
8.2.10.0040.00417.78
8.2.00.0080.00317.90
8.1.280.0070.01025.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00323.83
8.1.230.0070.00719.18
8.1.220.0000.00917.76
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0040.00418.74
8.1.160.0040.00421.98
8.1.150.0050.00318.80
8.1.140.0040.00417.62
8.1.130.0030.00317.98
8.1.120.0000.00717.57
8.1.110.0030.00617.47
8.1.100.0070.00017.48
8.1.90.0060.00317.56
8.1.80.0040.00317.52
8.1.70.0030.00317.53
8.1.60.0080.00017.73
8.1.50.0040.00417.50
8.1.40.0040.00417.48
8.1.30.0040.00417.65
8.1.20.0030.00617.81
8.1.10.0030.00617.65
8.1.00.0050.00217.53
8.0.300.0000.00718.77
8.0.290.0050.00216.88
8.0.280.0040.00418.32
8.0.270.0030.00317.22
8.0.260.0000.00716.79
8.0.250.0030.00716.95
8.0.240.0000.00817.02
8.0.230.0000.00717.07
8.0.220.0030.00316.96
8.0.210.0040.00416.89
8.0.200.0040.00417.06
8.0.190.0000.00816.99
8.0.180.0030.00517.08
8.0.170.0000.00716.91
8.0.160.0040.00416.98
8.0.150.0040.00416.94
8.0.140.0040.00417.00
8.0.130.0030.00313.42
8.0.120.0030.00517.07
8.0.110.0060.00316.87
8.0.100.0050.00216.84
8.0.90.0040.00417.00
8.0.80.0100.00617.00
8.0.70.0030.00416.91
8.0.60.0040.00416.85
8.0.50.0000.00716.96
8.0.30.0140.00817.21
8.0.20.0140.00617.40
8.0.10.0000.00717.11
8.0.00.0100.00817.00
7.4.330.0000.00515.12
7.4.320.0000.00716.78
7.4.300.0000.00616.77
7.4.290.0070.00016.69
7.4.280.0000.00816.80
7.4.270.0070.00016.84
7.4.260.0030.00313.48
7.4.250.0050.00316.79
7.4.240.0050.00216.75
7.4.230.0060.00016.69
7.4.220.0060.01316.69
7.4.210.0070.00816.86
7.4.200.0040.00416.83
7.4.190.0000.00816.61
7.4.160.0140.00716.69
7.4.150.0090.01617.40
7.4.140.0090.01117.86
7.4.130.0080.00916.67
7.4.120.0050.01516.65
7.4.110.0030.01916.76
7.4.100.0090.01216.76
7.4.90.0110.01516.64
7.4.80.0070.01419.39
7.4.70.0030.01316.61
7.4.60.0100.00716.47
7.4.50.0030.00616.61
7.4.40.0000.01522.77
7.4.30.0140.00716.51
7.4.00.0070.00714.89
7.3.330.0030.00213.34
7.3.320.0030.00313.27
7.3.310.0000.00616.33
7.3.300.0030.00316.23
7.3.290.0030.01016.34
7.3.280.0030.01116.34
7.3.270.0150.00417.40
7.3.260.0040.01416.67
7.3.250.0050.01216.39
7.3.240.0030.01316.64
7.3.230.0160.00016.39
7.3.210.0090.00916.47
7.3.200.0140.00719.39
7.3.190.0120.00916.63
7.3.180.0070.00716.36
7.3.170.0060.00916.27
7.3.160.0030.01316.41
7.3.120.0060.00914.84
7.2.330.0100.00616.72
7.2.320.0000.01616.75
7.2.310.0120.00616.70
7.2.300.0070.01016.68
7.2.290.0030.01316.64
7.2.60.0060.00616.98
7.2.00.0070.00719.36
7.1.200.0070.00715.93
7.1.100.0040.01518.17
7.1.70.0060.00617.34
7.1.60.0000.01017.57
7.1.50.0070.01317.12
7.1.00.0030.07022.59
7.0.200.0060.00616.46
7.0.140.0000.07322.07
7.0.60.0230.03020.01
7.0.50.0070.05017.84
7.0.40.0030.04720.25
7.0.30.0500.07320.02
7.0.20.0170.04020.33
7.0.10.0070.07320.13
7.0.00.0030.08720.19
5.6.280.0000.07721.12
5.6.210.0070.08020.56
5.6.200.0170.06718.08
5.6.190.0070.04320.27
5.6.180.0400.07020.35
5.6.170.0300.05020.44
5.6.160.0030.09020.44
5.6.150.0170.06718.16
5.6.140.0070.07018.18
5.6.130.0000.04318.18
5.6.120.0100.05720.96
5.6.110.0130.07721.01
5.6.100.0070.08321.08
5.6.90.0100.03721.09
5.6.80.0130.04320.43
5.5.350.0170.04020.43
5.5.340.0070.08017.99
5.5.330.0070.04720.17
5.5.320.0300.07320.30
5.5.310.0130.05320.29
5.5.300.0000.04017.88
5.5.290.0100.07317.93
5.5.280.0100.06320.87
5.5.270.0100.08020.63
5.5.260.0070.05320.75
5.5.250.0130.07720.65
5.5.240.0100.07020.03
5.4.450.0400.04019.39
5.4.440.0670.06319.22
5.4.430.0670.07019.25
5.4.420.0100.06319.42
5.4.410.0170.04718.97
5.4.400.0130.04718.84
5.4.390.0170.04318.53
5.4.380.0030.06018.69
5.4.370.0170.06018.50
5.4.360.0070.05718.47
5.4.350.0070.04911.98
5.4.340.0070.03711.98
5.4.320.0070.04112.46
5.4.310.0050.04012.46
5.4.300.0020.03912.46
5.4.290.0070.04112.45
5.4.280.0070.03412.35
5.4.270.0050.04612.36
5.4.260.0090.04312.36
5.4.250.0040.04512.35
5.4.240.0070.05018.80
5.4.230.0070.06018.66
5.4.220.0030.05718.87
5.4.210.0200.04018.80
5.4.200.0030.05318.71
5.4.190.0200.04318.76
5.4.180.0130.04718.66
5.4.170.0100.05318.76
5.4.160.0170.03718.70
5.4.150.0100.05018.65
5.4.140.0130.04716.20
5.4.130.0070.04716.19
5.4.120.0070.04716.22
5.4.110.0030.05316.46
5.4.100.0000.05716.17
5.4.90.0070.04716.41
5.4.80.0070.04716.45
5.4.70.0070.05316.41
5.4.60.0100.04716.34
5.4.50.0030.05016.41
5.4.40.0130.04316.37
5.4.30.0130.04316.34
5.4.20.0100.05316.18
5.4.10.0130.04716.42
5.4.00.0100.05715.70
5.3.290.0050.04012.80
5.3.280.0000.05714.61
5.3.270.0070.05314.38
5.3.260.0170.04014.38
5.3.250.0100.05014.31
5.3.240.0070.05014.51
5.3.230.0130.06714.70
5.3.220.0100.05314.73
5.3.210.0070.07314.59
5.3.200.0100.04714.58
5.3.190.0100.04714.47
5.3.180.0100.04714.62
5.3.170.0070.04714.56
5.3.160.0070.04714.59
5.3.150.0100.04714.62
5.3.140.0070.05014.34
5.3.130.0170.04314.57
5.3.120.0100.05014.32
5.3.110.0100.06014.27
5.3.100.0070.05313.90
5.3.90.0030.07014.04
5.3.80.0100.04714.17
5.3.70.0100.06314.02
5.3.60.0170.04714.02
5.3.50.0200.06313.87
5.3.40.0130.04314.11
5.3.30.0070.05014.07
5.3.20.0200.03713.70
5.3.10.0200.03313.35
5.3.00.0000.05713.64
5.2.170.0070.04011.10
5.2.160.0130.03711.17
5.2.150.0100.04311.04
5.2.140.0070.04010.98
5.2.130.0070.04011.10
5.2.120.0070.03711.11
5.2.110.0130.04011.22
5.2.100.0070.04011.13
5.2.90.0070.03711.13
5.2.80.0070.03711.25
5.2.70.0130.04011.09
5.2.60.0100.04010.81
5.2.50.0030.04310.94
5.2.40.0070.03710.79
5.2.30.0070.04010.98
5.2.20.0100.03310.98
5.2.10.0070.03710.80
5.2.00.0100.03310.61
5.1.60.0070.03010.15
5.1.50.0130.0279.77
5.1.40.0030.03310.13
5.1.30.0130.02710.34
5.1.20.0000.04010.34
5.1.10.0000.04010.03
5.1.00.0070.03710.13
5.0.50.0070.0278.51
5.0.40.0070.0438.39
5.0.30.0070.0408.07
5.0.20.0030.0278.14
5.0.10.0030.0278.13
5.0.00.0070.0578.22
4.4.90.0030.0207.32
4.4.80.0030.0207.32
4.4.70.0070.0177.32
4.4.60.0000.0237.32
4.4.50.0000.0237.32
4.4.40.0070.0307.32
4.4.30.0070.0177.32
4.4.20.0130.0107.32
4.4.10.0030.0307.32
4.4.00.0100.0277.32
4.3.110.0030.0207.32
4.3.100.0000.0237.32
4.3.90.0000.0337.32
4.3.80.0030.0307.32
4.3.70.0000.0237.32
4.3.60.0030.0407.32
4.3.50.0030.0207.32
4.3.40.0030.0307.32
4.3.30.0030.0207.32
4.3.20.0030.0277.32
4.3.10.0030.0207.32
4.3.00.0100.02714.48

preferences:
42.11 ms | 401 KiB | 5 Q