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.0040.01117.00
8.3.50.0090.00718.71
8.3.40.0140.00319.23
8.3.30.0090.00618.91
8.3.20.0080.00019.17
8.3.10.0090.00020.61
8.3.00.0040.00419.75
8.2.180.0120.00917.00
8.2.170.0060.00922.96
8.2.160.0070.01321.18
8.2.150.0000.00725.66
8.2.140.0130.00324.66
8.2.130.0080.00026.16
8.2.120.0080.00021.33
8.2.110.0000.01121.29
8.2.100.0120.00018.26
8.2.90.0070.00319.72
8.2.80.0050.00319.44
8.2.70.0060.00318.00
8.2.60.0020.00718.05
8.2.50.0080.00018.13
8.2.40.0040.00418.59
8.2.30.0080.00018.39
8.2.20.0060.00618.03
8.2.10.0000.00918.19
8.2.00.0060.00318.25
8.1.280.0070.00725.92
8.1.270.0090.00023.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00622.73
8.1.230.0130.00021.10
8.1.220.0030.00618.04
8.1.210.0060.00319.07
8.1.200.0100.00017.72
8.1.190.0050.00317.78
8.1.180.0030.00518.10
8.1.170.0060.00619.06
8.1.160.0070.00019.05
8.1.150.0040.00419.00
8.1.140.0040.00417.95
8.1.130.0030.00617.95
8.1.120.0000.00817.91
8.1.110.0030.00617.85
8.1.100.0020.00517.94
8.1.90.0040.00417.84
8.1.80.0040.00417.80
8.1.70.0030.00317.86
8.1.60.0030.00717.96
8.1.50.0050.00317.85
8.1.40.0040.00417.93
8.1.30.0000.00818.04
8.1.20.0080.00018.08
8.1.10.0030.00517.91
8.1.00.0050.00317.93
8.0.300.0000.00820.36
8.0.290.0080.00017.25
8.0.280.0040.00418.57
8.0.270.0030.00317.55
8.0.260.0040.00417.11
8.0.250.0000.00717.34
8.0.240.0030.00617.25
8.0.230.0000.00717.37
8.0.220.0000.00717.21
8.0.210.0040.00417.27
8.0.200.0060.00317.33
8.0.190.0000.00717.35
8.0.180.0000.00717.38
8.0.170.0040.00417.25
8.0.160.0060.00317.38
8.0.150.0070.00317.32
8.0.140.0030.00717.16
8.0.130.0000.00713.79
8.0.120.0000.00817.33
8.0.110.0030.00517.16
8.0.100.0040.00417.16
8.0.90.0000.00717.16
8.0.80.0090.01517.48
8.0.70.0040.00417.20
8.0.60.0080.00017.11
8.0.50.0000.00717.09
8.0.30.0070.01117.29
8.0.20.0080.01117.31
8.0.10.0050.00217.24
8.0.00.0070.01317.10
7.4.330.0050.00013.32
7.4.320.0070.00016.85
7.4.300.0000.00616.85
7.4.290.0030.00316.89
7.4.280.0000.00716.78
7.4.270.0030.00317.05
7.4.260.0060.00013.58
7.4.250.0000.00916.96
7.4.240.0070.00016.91
7.4.230.0000.00816.96
7.4.220.0140.00517.00
7.4.210.0060.00917.02
7.4.200.0030.00317.04
7.4.190.0040.00417.09
7.4.160.0100.00716.86
7.4.150.0090.01416.75
7.4.140.0030.01416.73
7.4.130.0230.01016.89
7.4.120.0150.00316.93
7.4.110.0100.01016.95
7.4.100.0110.00816.72
7.4.90.0070.01416.94
7.4.80.0100.01019.39
7.4.70.0070.01416.92
7.4.60.0090.00917.06
7.4.50.0080.00016.66
7.4.40.0100.00616.66
7.4.30.0030.01316.86
7.4.10.0070.00815.33
7.4.00.0020.01415.24
7.3.330.0030.00313.59
7.3.320.0040.00413.53
7.3.310.0030.00316.75
7.3.300.0000.00716.73
7.3.290.0090.00616.66
7.3.280.0130.00516.69
7.3.270.0150.00316.78
7.3.260.0110.01516.75
7.3.250.0150.00716.59
7.3.240.0150.00616.65
7.3.230.0170.00916.88
7.3.210.0110.00516.65
7.3.200.0110.00616.59
7.3.190.0030.01416.73
7.3.180.0100.00716.68
7.3.170.0070.01016.68
7.3.160.0150.00716.76
7.3.130.0060.01115.09
7.3.120.0070.00915.15
7.3.110.0090.00815.27
7.3.100.0030.01114.98
7.3.90.0050.01015.18
7.3.80.0020.01315.21
7.3.70.0070.00615.12
7.3.60.0110.00415.06
7.3.50.0010.01215.10
7.3.40.0050.00615.10
7.3.30.0050.00815.15
7.3.20.0050.00917.01
7.3.10.0050.00717.00
7.3.00.0060.00917.00
7.2.330.0110.00717.00
7.2.320.0150.00316.91
7.2.310.0130.00616.82
7.2.300.0070.01016.91
7.2.290.0060.01216.86
7.2.260.0070.01115.25
7.2.250.0100.00715.48
7.2.240.0080.00815.33
7.2.230.0070.01015.15
7.2.220.0050.00815.26
7.2.210.0030.01415.41
7.2.200.0070.00715.22
7.2.190.0090.00615.15
7.2.180.0090.00415.38
7.2.170.0030.01115.13
7.2.160.0040.01115.15
7.2.150.0060.00817.04
7.2.140.0050.00917.23
7.2.130.0080.00817.22
7.2.120.0040.00917.21
7.2.110.0070.00917.18
7.2.100.0040.01117.22
7.2.90.0050.00817.29
7.2.80.0090.00817.24
7.2.70.0060.00817.28
7.2.60.0070.00717.18
7.2.50.0060.01317.15
7.2.40.0060.00917.13
7.2.30.0020.01017.25
7.2.20.0030.01017.12
7.2.10.0080.00517.32
7.2.00.0030.01217.90
7.1.330.0050.01116.28
7.1.320.0080.00816.07
7.1.310.0070.00816.20
7.1.300.0090.00516.20
7.1.290.0060.00716.33
7.1.280.0070.00916.17
7.1.270.0080.00616.36
7.1.260.0090.00416.15
7.1.250.0080.00916.30
7.1.240.0050.00616.21
7.1.230.0080.00816.30
7.1.220.0030.00916.37
7.1.210.0080.00716.31
7.1.200.0020.01016.44
7.1.190.0030.01416.46
7.1.180.0060.00816.25
7.1.170.0030.01016.14
7.1.160.0020.01216.02
7.1.150.0050.00816.29
7.1.140.0110.00516.10
7.1.130.0040.00916.26
7.1.120.0080.00616.38
7.1.110.0050.01416.37
7.1.100.0080.00617.15
7.1.90.0080.00716.35
7.1.80.0000.01216.40
7.1.70.0050.01516.79
7.1.60.0100.00817.27
7.1.50.0070.00916.74
7.1.40.0080.00716.29
7.1.30.0090.00616.27
7.1.20.0050.01016.13
7.1.10.0100.00516.30
7.1.00.0060.02718.30
7.0.330.0060.00916.04
7.0.320.0020.01116.04
7.0.310.0050.00916.00
7.0.300.0050.01015.94
7.0.290.0020.01115.81
7.0.280.0050.00715.90
7.0.270.0050.00916.01
7.0.260.0070.00815.91
7.0.250.0080.00615.81
7.0.240.0070.00915.92
7.0.230.0030.01015.93
7.0.220.0050.00915.78
7.0.210.0030.01016.06
7.0.200.0060.00516.39
7.0.190.0090.00515.82
7.0.180.0050.01115.87
7.0.170.0070.00515.98
7.0.160.0130.00116.01
7.0.150.0040.00916.04
7.0.140.0050.03218.01
7.0.130.0040.00916.05
7.0.120.0060.02918.04
7.0.110.0060.00915.90
7.0.100.0020.00815.76
7.0.90.0040.00815.94
7.0.80.0060.00415.89
7.0.70.0060.00615.89
7.0.60.0060.01817.31
7.0.50.0020.02216.54
7.0.40.0060.02715.98
7.0.30.0070.02216.10
7.0.20.0060.02216.00
7.0.10.0050.02016.08
7.0.00.0030.03616.15
5.6.400.0060.00814.79
5.6.390.0070.01114.75
5.6.380.0070.00914.65
5.6.370.0040.00914.63
5.6.360.0070.00714.80
5.6.350.0060.00614.81
5.6.340.0070.00414.90
5.6.330.0060.00914.82
5.6.320.0070.01014.83
5.6.310.0060.00914.88
5.6.300.0110.00514.63
5.6.290.0080.00814.95
5.6.280.0060.03016.93
5.6.270.0070.00714.74
5.6.260.0080.00614.74
5.6.250.0030.00714.82
5.6.240.0030.01114.77
5.6.230.0040.00914.79
5.6.220.0050.01014.74
5.6.210.0050.02016.67
5.6.200.0040.02815.82
5.6.190.0050.02016.74
5.6.180.0160.03116.48
5.6.170.0150.03316.60
5.6.160.0050.03516.78
5.6.150.0110.02615.98
5.6.140.0050.03215.92
5.6.130.0060.02115.92
5.6.120.0020.02116.89
5.6.110.0080.03116.77
5.6.100.0060.03416.95
5.6.90.0080.03316.97
5.6.80.0090.02916.62
5.6.70.0040.01014.49
5.6.60.0040.01014.48
5.6.50.0060.00614.70
5.6.40.0080.00314.62
5.6.30.0040.00714.62
5.6.20.0070.00514.67
5.6.10.0070.00714.70
5.6.00.0040.00814.55
5.5.380.0040.01214.36
5.5.370.0060.00814.66
5.5.360.0040.01114.65
5.5.350.0110.03016.60
5.5.340.0060.01715.78
5.5.330.0040.03516.65
5.5.320.0150.02316.58
5.5.310.0180.02716.60
5.5.300.0020.02015.87
5.5.290.0030.02715.82
5.5.280.0080.03116.82
5.5.270.0040.03716.87
5.5.260.0060.03516.74
5.5.250.0070.01616.69
5.5.240.0050.01416.58
5.5.230.0070.00714.54
5.5.220.0060.00614.48
5.5.210.0060.00714.71
5.5.200.0080.00714.42
5.5.190.0050.00814.53
5.5.180.0030.01014.64
5.5.170.0090.00314.46
5.5.160.0090.00514.51
5.5.150.0050.00714.64
5.5.140.0070.00614.71
5.5.130.0080.00514.59
5.5.120.0050.00514.67
5.5.110.0030.00714.73
5.5.100.0080.00314.67
5.5.90.0090.00414.54
5.5.80.0070.00314.47
5.5.70.0060.00614.71
5.5.60.0040.00714.40
5.5.50.0050.00714.65
5.5.40.0090.00314.63
5.5.30.0090.00514.45
5.5.20.0040.00714.48
5.5.10.0020.01214.65
5.5.00.0050.00514.71
5.4.450.0060.03214.36
5.4.440.0100.02514.37
5.4.430.0040.01814.34
5.4.420.0030.02914.27
5.4.410.0030.02314.43
5.4.400.0060.02914.24
5.4.390.0060.01414.32
5.4.380.0060.02814.34
5.4.370.0060.02714.32
5.4.360.0060.02914.30
5.4.350.0040.02914.31
5.4.340.0060.02214.37
5.4.330.0050.00411.92
5.4.320.0050.02914.24
5.4.310.0030.02414.24
5.4.300.0070.02314.25
5.4.290.0070.01814.37
5.4.280.0020.02314.38
5.4.270.0090.02814.32
5.4.260.0020.01914.20
5.4.250.0050.02214.27
5.4.240.0050.03014.29
5.4.230.0070.02114.16
5.4.220.0050.02014.26
5.4.210.0070.02514.41
5.4.200.0080.01914.14
5.4.190.0060.02614.38
5.4.180.0060.02414.36
5.4.170.0040.02714.20
5.4.160.0040.02614.25
5.4.150.0070.02514.11
5.4.140.0070.02313.31
5.4.130.0050.03013.28
5.4.120.0040.03013.36
5.4.110.0060.02913.24
5.4.100.0100.02013.27
5.4.90.0120.01413.45
5.4.80.0080.02613.39
5.4.70.0050.01613.34
5.4.60.0060.02713.38
5.4.50.0060.02813.39
5.4.40.0060.01813.41
5.4.30.0020.02213.30
5.4.20.0040.02813.29
5.4.10.0050.01713.38
5.4.00.0070.01513.25
5.3.290.0050.02712.59
5.3.280.0080.01612.54
5.3.270.0020.03312.58
5.3.260.0060.02912.56
5.3.250.0060.01912.60
5.3.240.0010.03112.52
5.3.230.0030.03212.60
5.3.220.0030.02212.51
5.3.210.0030.02212.49
5.3.200.0030.02712.41
5.3.190.0060.02712.53
5.3.180.0020.03012.53
5.3.170.0020.03212.48
5.3.160.0030.02212.56
5.3.150.0040.02912.50
5.3.140.0070.02612.54
5.3.130.0050.02312.55
5.3.120.0040.01912.50
5.3.110.0080.02312.53
5.3.100.0060.02612.42
5.3.90.0070.01712.40
5.3.80.0040.02712.33
5.3.70.0030.03012.27
5.3.60.0040.02112.31
5.3.50.0050.01812.22
5.3.40.0040.01512.24
5.3.30.0030.02312.26
5.3.20.0060.01512.17
5.3.10.0070.02712.09
5.3.00.0060.01412.17
5.2.170.0070.02711.03
5.2.160.0000.03311.14
5.2.150.0030.06710.97
5.2.140.0070.05311.09
5.2.130.0070.06011.09
5.2.120.0130.04311.00
5.2.110.0000.03311.11
5.2.100.0070.06311.07
5.2.90.0030.05010.97
5.2.80.0100.06010.97
5.2.70.0070.02711.03
5.2.60.0030.03310.94
5.2.50.0000.03310.95
5.2.40.0030.03710.94
5.2.30.0070.04010.92
5.2.20.0030.05310.95
5.2.10.0030.06010.86
5.2.00.0070.05710.71
5.1.60.0030.0379.99
5.1.50.0000.0309.98
5.1.40.0130.0479.97
5.1.30.0030.03310.33
5.1.20.0000.03010.43
5.1.10.0000.04310.09
5.1.00.0000.05010.07
5.0.50.0030.0478.76
5.0.40.0000.0308.76
5.0.30.0070.0608.76
5.0.20.0030.0378.76
5.0.10.0070.0438.76
5.0.00.0000.0638.76
4.4.90.0000.0178.76
4.4.80.0030.0138.76
4.4.70.0000.0408.76
4.4.60.0030.0378.76
4.4.50.0070.0308.76
4.4.40.0000.0378.76
4.4.30.0000.0338.76
4.4.20.0000.0178.76
4.4.10.0030.0378.76
4.4.00.0030.0408.76
4.3.110.0000.0408.76
4.3.100.0030.0378.76
4.3.90.0070.0338.76
4.3.80.0000.0408.76
4.3.70.0030.0378.76
4.3.60.0070.0338.76
4.3.50.0030.0378.76
4.3.40.0030.0478.76
4.3.30.0000.0308.76
4.3.20.0000.0338.76
4.3.10.0000.0308.76
4.3.00.0070.0308.76

preferences:
51.61 ms | 401 KiB | 5 Q