3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TXT /some /text / TXT; $pattern = "/"; $pattern = mb_convert_encoding($pattern, 'UTF-8', 'Windows-1251'); $pattern = preg_quote($pattern, '/'); $pattern = mb_convert_encoding($pattern, 'Windows-1251', 'UTF-8'); $pattern .= "(?:(text)|(some))"; var_dump($pattern); $matches = array(); $match = preg_match_all("/" . $pattern . "/mi", $text, $matches); var_dump($match, $matches); mb_regex_encoding('UTF-8'); mb_ereg_search_init($text); while(mb_ereg_search("" . $pattern, "imz")) { $r = mb_ereg_search_getregs(); mb_ereg_search_setpos(mb_ereg_search_getpos()); var_dump($r); }

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.0140.00716.88
8.3.50.0060.01122.09
8.3.40.0090.00619.09
8.3.30.0110.00419.07
8.3.20.0040.00420.41
8.3.10.0080.00023.73
8.3.00.0080.00020.98
8.2.180.0040.01118.80
8.2.170.0150.00622.96
8.2.160.0030.01420.64
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0130.00726.16
8.2.120.0050.00322.44
8.2.110.0120.01222.48
8.2.100.0090.00318.22
8.2.90.0000.00819.64
8.2.80.0040.00418.30
8.2.70.0090.00018.00
8.2.60.0070.00318.40
8.2.50.0040.00418.13
8.2.40.0060.00318.41
8.2.30.0000.00818.42
8.2.20.0040.00418.21
8.2.10.0000.00818.22
8.2.00.0000.00818.14
8.1.280.0160.00625.92
8.1.270.0000.00923.96
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00324.04
8.1.230.0040.00719.28
8.1.220.0050.00317.89
8.1.210.0030.00518.77
8.1.200.0070.00317.60
8.1.190.0050.00317.68
8.1.180.0050.00318.10
8.1.170.0030.00718.96
8.1.160.0060.00322.17
8.1.150.0040.00418.97
8.1.140.0040.00417.92
8.1.130.0070.00018.09
8.1.120.0030.00517.85
8.1.110.0050.00317.91
8.1.100.0070.00017.91
8.1.90.0040.00417.80
8.1.80.0040.00417.84
8.1.70.0040.00417.82
8.1.60.0040.00418.04
8.1.50.0040.00418.01
8.1.40.0000.00917.93
8.1.30.0030.00517.99
8.1.20.0000.00818.09
8.1.10.0000.00817.86
8.1.00.0030.00717.93
8.0.300.0070.00018.77
8.0.290.0070.00017.28
8.0.280.0000.00718.67
8.0.270.0000.00717.47
8.0.260.0030.00317.24
8.0.250.0000.00717.36
8.0.240.0030.00517.36
8.0.230.0000.00817.30
8.0.220.0070.00017.36
8.0.210.0080.00017.29
8.0.200.0040.00417.36
8.0.190.0050.00317.35
8.0.180.0000.00817.34
8.0.170.0000.00717.35
8.0.160.0040.00417.33
8.0.150.0070.00017.28
8.0.140.0070.00017.25
8.0.130.0030.00313.79
8.0.120.0040.00417.30
8.0.110.0040.00417.33
8.0.100.0080.00017.17
8.0.90.0000.00717.35
8.0.80.0130.00617.30
8.0.70.0040.00417.35
8.0.60.0040.00417.11
8.0.50.0040.00417.25
8.0.30.0110.01017.35
8.0.20.0120.01117.57
8.0.10.0000.00717.48
8.0.00.0100.01617.05
7.4.330.0020.00215.00
7.4.320.0030.00316.87
7.4.300.0030.00316.94
7.4.290.0000.00817.01
7.4.280.0030.00316.95
7.4.270.0000.00816.91
7.4.260.0030.00516.76
7.4.250.0040.00416.89
7.4.240.0050.00216.98
7.4.230.0000.00716.93
7.4.220.0110.00717.00
7.4.210.0060.01217.02
7.4.200.0050.00216.89
7.4.190.0080.00016.74
7.4.160.0100.01016.72
7.4.150.0150.00317.40
7.4.140.0160.00617.86
7.4.130.0110.01016.93
7.4.120.0140.00317.03
7.4.110.0090.01316.80
7.4.100.0110.00816.94
7.4.90.0120.00616.96
7.4.80.0110.00719.39
7.4.70.0190.02716.79
7.4.60.0000.01716.80
7.4.50.0030.00616.86
7.4.40.0000.01122.77
7.4.30.0100.00616.86
7.4.00.0090.00815.26
7.3.330.0000.00513.43
7.3.320.0030.00713.52
7.3.310.0020.00516.73
7.3.300.0030.00316.71
7.3.290.0030.01416.75
7.3.280.0090.00616.70
7.3.270.0100.01017.40
7.3.260.0090.00916.73
7.3.250.0140.00516.72
7.3.240.0060.01316.64
7.3.230.0040.01416.76
7.3.210.0090.00916.67
7.3.200.0110.01119.39
7.3.190.0060.01216.79
7.3.180.0140.00716.78
7.3.170.0080.00816.77
7.3.160.0030.01316.66
7.3.120.0060.01315.24
7.3.110.0050.00915.27
7.3.100.0050.00715.17
7.3.90.0050.00914.96
7.3.80.0080.00615.23
7.3.70.0090.00415.06
7.3.60.0080.00715.02
7.3.50.0050.00715.05
7.3.40.0060.00714.88
7.3.30.0030.01115.07
7.3.20.0050.00817.01
7.3.10.0080.00716.80
7.3.00.0060.00816.82
7.2.330.0060.01116.91
7.2.320.0100.00716.76
7.2.310.0030.01716.72
7.2.300.0090.00916.77
7.2.290.0090.00916.89
7.2.250.0100.00815.28
7.2.240.0100.01015.27
7.2.230.0030.01215.20
7.2.220.0060.00415.27
7.2.210.0080.00815.46
7.2.200.0050.00515.16
7.2.190.0070.00715.35
7.2.180.0070.00715.31
7.2.170.0070.00815.33
7.2.00.0030.01019.66
7.1.330.0060.00916.11
7.1.320.0050.00816.18
7.1.310.0090.00316.42
7.1.300.0050.00816.22
7.1.290.0080.00616.14
7.1.280.0050.00916.38
7.1.270.0060.00616.15
7.1.260.0060.01016.12
7.1.100.0580.00316.34
7.1.70.0000.00917.52
7.1.60.0030.02219.29
7.1.50.0050.01617.42
7.1.00.0030.07722.43
7.0.200.0060.00317.29
7.0.140.0030.07322.02
7.0.100.0270.07720.04
7.0.90.0000.08720.01
7.0.80.0070.04719.90
7.0.70.0230.08719.99
7.0.60.0270.05719.97
7.0.50.0000.08020.32
7.0.40.0170.08020.07
7.0.30.0100.08020.21
7.0.20.0070.06720.19
7.0.10.0070.07720.16
7.0.00.0070.05020.20
5.6.280.0000.07721.18
5.6.250.0070.08020.52
5.6.240.0070.04720.75
5.6.230.0070.07720.70
5.6.220.0070.04020.74
5.6.210.0170.07720.68
5.6.200.0070.05021.21
5.6.190.0100.08021.13
5.6.180.0030.04320.98
5.6.170.0070.04020.97
5.6.160.0070.07721.12
5.6.150.0070.05720.96
5.6.140.0000.08721.09
5.6.130.0070.05020.98
5.6.120.0100.08721.03
5.6.110.0030.09021.04
5.6.100.0100.04321.02
5.6.90.0100.08021.04
5.6.80.0030.07320.38
5.6.70.0100.04320.36
5.6.60.0100.07320.48
5.6.50.0030.06020.37
5.6.40.0030.04720.44
5.6.30.0100.07320.34
5.6.20.0200.06320.55
5.6.10.0130.04320.46
5.6.00.0100.05020.33
5.5.380.0100.05320.38
5.5.370.0030.04320.48
5.5.360.0030.06320.38
5.5.350.0030.05320.46
5.5.340.0170.06020.81
5.5.330.0170.07020.87
5.5.320.0030.05020.93
5.5.310.0030.07020.86
5.5.300.0000.05320.95
5.5.290.0100.07320.93
5.5.280.0170.07020.79
5.5.270.0170.09720.79
5.5.260.0170.06320.91
5.5.250.0100.04720.67
5.5.240.0030.04720.33
5.5.230.0000.05320.16
5.5.220.0000.05320.18
5.5.210.0070.04320.14
5.5.200.0170.06020.26
5.5.190.0070.08320.25
5.5.180.0130.06720.18
5.5.160.0100.07320.18
5.5.150.0030.04720.26
5.5.140.0070.06020.21
5.5.130.0100.03320.17
5.5.120.0030.06320.25
5.5.110.0200.05020.29
5.5.100.0230.06320.11
5.5.90.0030.04320.09
5.5.80.0100.07020.20
5.5.70.0030.05019.93
5.5.60.0170.06320.03
5.5.50.0170.06720.06
5.5.40.0100.07020.18
5.5.30.0070.07020.05
5.5.20.0230.06319.99
5.5.10.0130.06320.03
5.5.00.0170.06020.13
5.4.450.0130.06719.47
5.4.440.0000.05319.40
5.4.430.0070.06719.45
5.4.420.0130.04719.44
5.4.410.0230.06019.23
5.4.400.0100.06019.05
5.4.390.0030.08319.07
5.4.380.0030.07019.03
5.4.370.0000.07319.03
5.4.360.0030.08019.07
5.4.350.0130.07018.79
5.4.340.0070.08318.79
5.4.320.0170.05719.06
5.4.310.0030.04019.08
5.4.300.0100.05719.11
5.4.290.0030.04019.07
5.4.280.0130.05319.14
5.4.270.0030.04019.02
5.4.260.0170.06318.97
5.4.250.0130.06319.11
5.4.240.0100.06019.11
5.4.230.0030.04319.13
5.4.220.0100.05718.80
5.4.210.0070.06718.96
5.4.200.0070.07019.02
5.4.190.0030.06718.78
5.4.180.0170.07018.97
5.4.170.0100.06719.10
5.4.160.0000.08318.88
5.4.150.0100.06018.89
5.4.140.0100.05716.38
5.4.130.0070.07316.26
5.4.120.0100.07016.29
5.4.110.0100.07016.36
5.4.100.0100.03716.39
5.4.90.0100.03016.36
5.4.80.0030.04016.40
5.4.70.0100.04316.40
5.4.60.0100.06316.21
5.4.50.0070.03016.37
5.4.40.0100.07016.38
5.4.30.0130.06716.36
5.4.20.0030.03716.28
5.4.10.0130.05716.26
5.4.00.0030.07715.68
5.3.290.0270.06014.62
5.3.280.0000.07714.45
5.3.270.0030.05714.57
5.3.260.0100.07314.44
5.3.250.0030.06714.56
5.3.240.0070.06714.54
5.3.230.0130.07714.61
5.3.220.0100.07314.56
5.3.210.0070.07714.43
5.3.200.0170.04714.43
5.3.190.0000.04714.55
5.3.180.0030.06014.56
5.3.170.0100.06714.54
5.3.160.0070.03014.40
5.3.150.0000.08014.56
5.3.140.0100.06314.56
5.3.130.0070.08014.48
5.3.120.0030.05714.46
5.3.110.0100.06014.54
5.3.100.0070.06314.02
5.3.90.0130.05714.00
5.3.80.0070.07013.98
5.3.70.0030.07713.87
5.3.60.0130.05713.99
5.3.50.0100.07313.94
5.3.40.0070.07313.93
5.3.30.0070.05013.70
5.3.20.0030.04013.63
5.3.10.0070.06013.46
5.3.00.0030.06713.63
5.2.170.0070.05711.14
5.2.160.0100.06011.11
5.2.150.0100.06011.10
5.2.140.0070.06311.19
5.2.130.0030.02710.91
5.2.120.0130.03711.02
5.2.110.0070.06011.14
5.2.100.0070.04011.08
5.2.90.0100.05711.13
5.2.80.0100.04711.08
5.2.70.0100.04310.93
5.2.60.0070.06311.07
5.2.50.0030.05010.94
5.2.40.0000.06311.00
5.2.30.0030.04011.00
5.2.20.0030.06011.02
5.2.10.0070.03710.91
5.2.00.0070.02710.57
5.1.60.0030.05310.05
5.1.50.0030.0439.84
5.1.40.0070.0439.96
5.1.30.0030.04710.35
5.1.20.0000.05010.40
5.1.10.0030.05310.15
5.1.00.0130.02010.12
5.0.50.0030.0408.61
5.0.40.0030.0238.41
5.0.30.0000.0408.22
5.0.20.0070.0308.28
5.0.10.0000.0478.27
5.0.00.0030.0678.28
4.4.90.0000.0207.08
4.4.80.0070.0137.08
4.4.70.0030.0237.08
4.4.60.0000.0277.08
4.4.50.0000.0207.08
4.4.40.0030.0277.08
4.4.30.0000.0177.08
4.4.20.0000.0377.08
4.4.10.0030.0337.08
4.4.00.0000.0507.08
4.3.110.0000.0407.08
4.3.100.0000.0207.08
4.3.90.0000.0277.08
4.3.80.0100.0277.08
4.3.70.0000.0377.08
4.3.60.0000.0177.08
4.3.50.0000.0207.08
4.3.40.0000.0237.08
4.3.30.0070.0307.08
4.3.20.0000.0307.08
4.3.10.0030.0177.08
4.3.00.0000.0307.08

preferences:
47.15 ms | 401 KiB | 5 Q