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'); 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.0100.01018.61
8.3.50.0110.00822.19
8.3.40.0080.00819.09
8.3.30.0070.00718.89
8.3.20.0040.00420.46
8.3.10.0040.00422.22
8.3.00.0040.01122.40
8.2.180.0040.01416.88
8.2.170.0040.01122.96
8.2.160.0110.00721.32
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0000.00826.16
8.2.120.0040.00419.80
8.2.110.0100.00022.38
8.2.100.0100.00318.22
8.2.90.0000.00819.47
8.2.80.0050.00318.28
8.2.70.0080.00017.88
8.2.60.0050.00318.17
8.2.50.0040.00418.13
8.2.40.0000.00818.22
8.2.30.0030.00618.41
8.2.20.0000.00818.17
8.2.10.0000.00819.87
8.2.00.0030.00518.26
8.1.280.0040.01525.92
8.1.270.0000.00824.17
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00623.95
8.1.230.0080.00419.26
8.1.220.0030.00617.91
8.1.210.0050.00318.77
8.1.200.0030.00617.63
8.1.190.0080.00017.88
8.1.180.0080.00018.10
8.1.170.0040.00418.96
8.1.160.0040.00422.21
8.1.150.0030.00618.93
8.1.140.0040.00417.90
8.1.130.0030.00317.90
8.1.120.0040.00417.84
8.1.110.0030.00917.86
8.1.100.0040.00417.87
8.1.90.0070.00017.85
8.1.80.0000.00817.86
8.1.70.0040.00417.82
8.1.60.0040.00417.99
8.1.50.0000.00817.77
8.1.40.0000.00817.92
8.1.30.0030.00518.00
8.1.20.0030.00518.08
8.1.10.0040.00417.82
8.1.00.0040.00417.93
8.0.300.0040.00418.77
8.0.290.0000.00717.17
8.0.280.0000.00718.64
8.0.270.0080.00017.41
8.0.260.0040.00417.11
8.0.250.0030.00317.36
8.0.240.0000.00717.32
8.0.230.0050.00217.35
8.0.220.0070.00017.27
8.0.210.0000.00817.25
8.0.200.0050.00217.38
8.0.190.0000.00717.38
8.0.180.0050.00317.30
8.0.170.0060.00317.35
8.0.160.0050.00217.30
8.0.150.0000.00717.14
8.0.140.0070.00017.16
8.0.130.0030.00313.61
8.0.120.0070.00017.22
8.0.110.0040.00417.30
8.0.100.0040.00417.22
8.0.90.0000.00817.11
8.0.80.0150.00017.31
8.0.70.0000.00717.17
8.0.60.0000.00817.17
8.0.50.0020.00517.06
8.0.30.0150.00817.54
8.0.20.0110.00817.49
8.0.10.0040.00417.16
8.0.00.0100.00916.97
7.4.330.0000.00715.29
7.4.320.0030.00316.89
7.4.300.0060.00016.77
7.4.290.0030.00316.90
7.4.280.0030.00316.91
7.4.270.0080.00016.87
7.4.260.0030.00416.83
7.4.250.0040.00416.96
7.4.240.0040.00416.92
7.4.230.0000.00716.93
7.4.220.0150.00417.00
7.4.210.0090.00616.99
7.4.200.0040.00416.70
7.4.190.0070.00016.91
7.4.160.0120.00416.84
7.4.150.0140.00317.40
7.4.140.0070.01417.86
7.4.130.0090.01216.84
7.4.120.0100.01116.89
7.4.110.0070.01116.86
7.4.100.0100.01017.08
7.4.90.0090.01516.71
7.4.80.0140.00417.02
7.4.70.0040.01616.64
7.4.60.0100.00716.95
7.4.50.0030.00316.61
7.4.40.0000.01722.77
7.4.30.0090.00916.73
7.4.00.0060.00615.46
7.3.330.0030.00313.51
7.3.320.0000.00713.41
7.3.310.0070.00016.52
7.3.300.0000.00716.65
7.3.290.0040.01316.69
7.3.280.0070.01016.67
7.3.270.0130.00317.40
7.3.260.0080.01216.68
7.3.250.0140.00516.80
7.3.240.0060.01316.73
7.3.230.0130.00416.71
7.3.210.0170.00316.83
7.3.200.0000.02319.39
7.3.190.0120.00616.60
7.3.180.0100.01016.71
7.3.170.0060.01216.80
7.3.160.0120.00616.78
7.3.120.0100.00615.08
7.3.110.0040.01315.08
7.3.100.0100.00714.92
7.3.90.0060.01014.96
7.3.80.0050.00715.27
7.3.70.0020.00814.99
7.3.60.0060.00514.94
7.3.50.0030.01015.15
7.3.40.0050.00815.13
7.3.30.0020.01115.11
7.3.20.0080.00816.97
7.3.10.0020.01017.14
7.3.00.0030.00916.95
7.2.330.0060.01216.79
7.2.320.0120.00816.93
7.2.310.0110.00716.91
7.2.300.0080.00816.89
7.2.290.0110.01316.93
7.2.240.0000.01715.28
7.2.230.0120.00515.27
7.2.220.0080.00415.15
7.2.210.0070.00815.19
7.2.200.0040.00615.25
7.2.190.0050.01015.26
7.2.180.0050.00715.29
7.2.170.0040.00715.28
7.2.160.0100.00215.38
7.2.150.0020.01317.12
7.2.140.0070.00617.22
7.2.130.0100.00317.17
7.2.120.0100.00717.21
7.2.110.0060.00617.05
7.2.100.0070.00917.08
7.2.90.0020.01117.12
7.2.80.0050.01117.17
7.2.70.0190.00617.08
7.2.60.0090.00916.98
7.2.50.0100.00517.22
7.2.40.0080.00517.25
7.2.30.0050.01017.18
7.2.20.0060.00817.20
7.2.10.0080.00916.99
7.2.00.0110.00317.07
7.1.330.0100.00716.00
7.1.320.0090.00716.09
7.1.310.0060.00616.07
7.1.300.0020.01216.11
7.1.290.0070.00416.13
7.1.280.0040.01316.16
7.1.270.0060.00715.99
7.1.260.0040.00916.24
7.1.250.0110.00616.13
7.1.200.0060.00916.25
7.1.100.0090.00618.48
7.1.70.0000.00717.37
7.1.60.0000.01117.79
7.1.50.0040.01117.21
7.1.00.0000.08022.57
7.0.200.0060.00917.04
7.0.140.0070.07022.18
7.0.110.0100.08020.16
7.0.100.0070.08019.99
7.0.90.0070.08320.02
7.0.80.0030.08720.08
7.0.70.0030.08020.02
7.0.60.0000.06020.00
7.0.50.0130.08320.32
7.0.40.0130.08720.21
7.0.30.0100.08020.25
7.0.20.0070.08720.36
7.0.10.0030.05320.12
7.0.00.0070.08720.25
5.6.280.0070.07320.92
5.6.260.0130.07720.76
5.6.250.0070.07720.72
5.6.240.0200.06720.79
5.6.230.0100.08020.78
5.6.220.0070.07020.75
5.6.210.0070.04720.69
5.6.200.0070.09321.30
5.6.190.0200.06721.32
5.6.180.0100.07321.21
5.6.170.0170.06021.16
5.6.160.0100.08721.23
5.6.150.0200.06321.10
5.6.140.0100.07721.29
5.6.130.0030.09321.17
5.6.120.0070.08021.11
5.6.110.0070.08021.13
5.6.100.0100.08321.00
5.6.90.0170.04321.20
5.6.80.0100.08020.43
5.6.70.0070.08020.37
5.6.60.0070.07320.60
5.6.50.0070.07720.73
5.6.40.0130.07720.51
5.6.30.0070.07720.38
5.6.20.0070.07720.71
5.6.10.0070.07720.55
5.6.00.0130.07320.69
5.5.380.0170.07320.64
5.5.370.0070.07320.55
5.5.360.0070.06720.47
5.5.350.0170.07020.54
5.5.340.0130.04320.86
5.5.330.0000.08720.87
5.5.320.0100.08020.74
5.5.310.0030.07021.04
5.5.300.0130.07020.89
5.5.290.0030.07721.07
5.5.280.0070.08320.86
5.5.270.0100.08021.02
5.5.260.0030.08720.91
5.5.250.0030.09020.70
5.5.240.0170.07020.16
5.5.230.0130.07320.23
5.5.220.0070.07720.30
5.5.210.0100.05320.47
5.5.200.0070.07720.32
5.5.190.0030.08320.33
5.5.180.0030.05320.21
5.5.160.0170.06320.23
5.5.150.0100.04320.26
5.5.140.0030.08020.33
5.5.130.0000.04720.23
5.5.120.0070.03720.23
5.5.110.0030.04320.20
5.5.100.0130.06720.21
5.5.90.0030.03720.13
5.5.80.0100.03020.18
5.5.70.0030.04020.23
5.5.60.0100.03020.32
5.5.50.0030.05020.26
5.5.40.0070.04320.26
5.5.30.0000.04320.14
5.5.20.0100.05320.09
5.5.10.0030.04020.28
5.5.00.0070.07720.24
5.4.450.0070.07719.40
5.4.440.0030.08019.31
5.4.430.0100.07719.59
5.4.420.0070.04719.57
5.4.410.0030.07719.36
5.4.400.0130.07019.11
5.4.390.0100.07019.08
5.4.380.0130.06719.27
5.4.370.0000.08019.03
5.4.360.0100.07319.16
5.4.350.0030.08018.98
5.4.340.0030.04719.16
5.4.320.0030.08018.98
5.4.310.0170.06719.16
5.4.300.0070.06019.07
5.4.290.0030.05318.93
5.4.280.0100.03018.98
5.4.270.0100.05718.93
5.4.260.0000.04019.03
5.4.250.0070.03719.02
5.4.240.0030.03719.11
5.4.230.0070.03319.09
5.4.220.0070.04018.98
5.4.210.0030.04019.11
5.4.200.0070.03719.14
5.4.190.0030.05719.01
5.4.180.0100.03719.15
5.4.170.0000.04019.11
5.4.160.0100.04319.09
5.4.150.0000.05318.95
5.4.140.0030.03716.50
5.4.130.0030.04716.56
5.4.120.0030.04016.27
5.4.110.0030.03716.58
5.4.100.0070.03016.58
5.4.90.0030.03716.54
5.4.80.0000.03716.52
5.4.70.0070.04716.59
5.4.60.0000.04316.18
5.4.50.0000.03716.43
5.4.40.0100.03716.31
5.4.30.0030.03316.42
5.4.20.0030.04316.48
5.4.10.0030.06716.48
5.4.00.0030.03715.79
5.3.290.0070.08014.61
5.3.280.0030.03714.50
5.3.270.0070.03714.43
5.3.260.0100.08014.39
5.3.250.0030.06714.43
5.3.240.0170.02014.51
5.3.230.0070.03314.67
5.3.220.0030.04014.64
5.3.210.0030.03314.58
5.3.200.0030.04314.36
5.3.190.0030.03714.46
5.3.180.0030.03714.55
5.3.170.0000.04014.48
5.3.160.0030.06314.48
5.3.150.0030.03714.57
5.3.140.0030.04314.45
5.3.130.0030.03714.33
5.3.120.0000.04014.43
5.3.110.0030.03714.39
5.3.100.0030.05013.95
5.3.90.0000.04014.04
5.3.80.0130.02713.94
5.3.70.0030.04013.84
5.3.60.0000.04314.03
5.3.50.0030.04013.84
5.3.40.0030.03713.79
5.3.30.0000.03713.81
5.3.20.0070.03313.75
5.3.10.0000.03713.44
5.3.00.0000.03713.50
5.2.170.0000.03712.18
5.2.160.0030.02712.18
5.2.150.0100.02012.18
5.2.140.0000.03312.18
5.2.130.0000.03012.18
5.2.120.0000.03312.18
5.2.110.0030.04012.18
5.2.100.0000.03312.18
5.2.90.0000.03012.18
5.2.80.0030.04312.18
5.2.70.0070.02712.18
5.2.60.0000.03312.18
5.2.50.0030.05712.18
5.2.40.0070.06312.18
5.2.30.0030.05012.18
5.2.20.0130.04712.18
5.2.10.0070.05712.18
5.2.00.0170.05012.18
5.1.60.0030.05012.18
5.1.50.0170.04312.18
5.1.40.0030.05312.18
5.1.30.0030.05312.18
5.1.20.0100.03712.18
5.1.10.0000.04712.18
5.1.00.0100.05312.18
5.0.50.0070.04012.18
5.0.40.0070.04012.18
5.0.30.0030.06712.18
5.0.20.0000.05012.18
5.0.10.0000.04712.18
5.0.00.0000.06312.18
4.4.90.0030.02012.18
4.4.80.0030.03312.18
4.4.70.0030.03712.18
4.4.60.0000.03712.18
4.4.50.0130.02312.18
4.4.40.0100.05012.18
4.4.30.0030.03312.18
4.4.20.0030.01712.18
4.4.10.0000.03712.18
4.4.00.0000.03312.18
4.3.110.0000.03312.18
4.3.100.0030.03312.18
4.3.90.0000.03712.18
4.3.80.0000.05012.18
4.3.70.0000.01712.18
4.3.60.0100.02712.18
4.3.50.0000.03712.18
4.3.40.0000.05312.18
4.3.30.0000.03712.18
4.3.20.0000.04012.18
4.3.10.0000.03712.18
4.3.00.0030.03312.18

preferences:
49.47 ms | 401 KiB | 5 Q