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.0060.01217.00
8.3.50.0070.01422.32
8.3.40.0070.00719.10
8.3.30.0110.00319.18
8.3.20.0090.00020.34
8.3.10.0050.00323.79
8.3.00.0030.00717.72
8.2.180.0080.00818.63
8.2.170.0120.00419.46
8.2.160.0100.01022.96
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0070.01026.16
8.2.120.0000.00822.52
8.2.110.0060.00322.45
8.2.100.0120.00018.28
8.2.90.0110.00019.38
8.2.80.0040.00418.15
8.2.70.0080.00017.63
8.2.60.0040.00417.93
8.2.50.0000.00818.13
8.2.40.0090.00018.34
8.2.30.0040.00418.42
8.2.20.0050.00318.14
8.2.10.0030.00620.31
8.2.00.0040.00718.07
8.1.280.0110.00425.92
8.1.270.0000.00922.26
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.00324.13
8.1.230.0080.00419.27
8.1.220.0000.00817.78
8.1.210.0030.00518.77
8.1.200.0070.00317.73
8.1.190.0000.00817.88
8.1.180.0050.00318.10
8.1.170.0000.00818.96
8.1.160.0070.00022.20
8.1.150.0070.00018.95
8.1.140.0000.00817.84
8.1.130.0070.00018.04
8.1.120.0050.00317.90
8.1.110.0070.00017.82
8.1.100.0000.00717.95
8.1.90.0040.00417.88
8.1.80.0030.00317.90
8.1.70.0030.00317.77
8.1.60.0060.00318.02
8.1.50.0000.00917.98
8.1.40.0040.00417.96
8.1.30.0060.00318.00
8.1.20.0050.00318.03
8.1.10.0000.00917.96
8.1.00.0030.00617.89
8.0.300.0070.00018.77
8.0.290.0030.00517.16
8.0.280.0030.00718.65
8.0.270.0080.00017.39
8.0.260.0040.00417.38
8.0.250.0000.00717.36
8.0.240.0000.00817.40
8.0.230.0030.00317.32
8.0.220.0000.00717.33
8.0.210.0000.00717.27
8.0.200.0030.00317.32
8.0.190.0000.00717.33
8.0.180.0000.00717.30
8.0.170.0060.00317.33
8.0.160.0040.00417.29
8.0.150.0000.00817.27
8.0.140.0000.00717.26
8.0.130.0060.00013.68
8.0.120.0040.00417.19
8.0.110.0050.00317.26
8.0.100.0060.00317.34
8.0.90.0050.00217.18
8.0.80.0100.01017.30
8.0.70.0050.00317.14
8.0.60.0040.00417.09
8.0.50.0050.00317.06
8.0.30.0170.00517.45
8.0.20.0110.01017.40
8.0.10.0040.00417.38
8.0.00.0060.01517.10
7.4.330.0030.00315.00
7.4.320.0000.00617.04
7.4.300.0070.00016.85
7.4.290.0050.00216.98
7.4.280.0030.00316.73
7.4.270.0040.00416.95
7.4.260.0080.00316.80
7.4.250.0070.00017.00
7.4.240.0050.00316.85
7.4.230.0040.00416.97
7.4.220.0060.01316.89
7.4.210.0100.00716.97
7.4.200.0080.00016.93
7.4.190.0050.00317.00
7.4.160.0080.00816.83
7.4.150.0110.00717.40
7.4.140.0050.01517.86
7.4.130.0050.01216.71
7.4.120.0100.00716.91
7.4.110.0070.01116.64
7.4.100.0030.02416.88
7.4.90.0090.00916.88
7.4.80.0110.00719.39
7.4.70.0100.00716.90
7.4.60.0030.01416.69
7.4.50.0050.00016.89
7.4.40.0070.00722.77
7.4.30.0140.00316.88
7.4.10.0070.01515.29
7.4.00.0080.00915.15
7.3.330.0030.00313.47
7.3.320.0060.00013.65
7.3.310.0030.00416.77
7.3.300.0040.00416.72
7.3.290.0070.01416.71
7.3.280.0120.00616.69
7.3.270.0140.01417.40
7.3.260.0120.01116.63
7.3.250.0110.01216.79
7.3.240.0100.00716.73
7.3.230.0130.00316.85
7.3.210.0060.01216.86
7.3.200.0120.01119.39
7.3.190.0100.00716.86
7.3.180.0160.00016.75
7.3.170.0090.00916.75
7.3.160.0070.01116.75
7.3.130.0090.01214.98
7.3.120.0060.01215.16
7.3.110.0090.00915.33
7.3.100.0080.00314.95
7.3.90.0000.01214.81
7.3.80.0120.00015.36
7.3.70.0030.00715.18
7.3.60.0030.01415.18
7.3.50.0070.00715.10
7.3.40.0090.00314.98
7.3.30.0030.01414.91
7.3.20.0070.01017.02
7.3.10.0000.01517.08
7.3.00.0030.00617.22
7.2.330.0130.00416.78
7.2.320.0060.01416.83
7.2.310.0060.01017.07
7.2.300.0150.00416.93
7.2.290.0100.01016.76
7.2.260.0030.01815.24
7.2.250.0070.01015.18
7.2.240.0150.00015.09
7.2.230.0110.00714.99
7.2.220.0090.00914.98
7.2.210.0030.01015.25
7.2.200.0100.00315.37
7.2.190.0070.00415.34
7.2.180.0030.01015.35
7.2.170.0070.00715.20
7.2.160.0030.01415.22
7.2.150.0060.00617.05
7.2.140.0030.01017.01
7.2.130.0070.00717.16
7.2.120.0040.01117.18
7.2.110.0090.00316.91
7.2.100.0060.00317.28
7.2.90.0090.00617.04
7.2.80.0070.00417.22
7.2.70.0080.00617.07
7.2.60.0120.00316.96
7.2.50.0060.00717.26
7.2.40.0080.00416.95
7.2.30.0060.01216.99
7.2.20.0070.00717.00
7.2.10.0070.01117.08
7.2.00.0030.01218.56
7.1.330.0000.01516.38
7.1.320.0140.00616.52
7.1.310.0060.00616.48
7.1.300.0090.00616.36
7.1.290.0060.00616.43
7.1.280.0060.00916.09
7.1.270.0060.00316.42
7.1.260.0080.00816.48
7.1.250.0100.00716.13
7.1.240.0110.00015.89
7.1.230.0060.01016.34
7.1.220.0120.00316.27
7.1.210.0070.01016.12
7.1.200.0070.01016.21
7.1.190.0060.01015.89
7.1.180.0030.01215.98
7.1.170.0110.00616.15
7.1.160.0040.00716.31
7.1.150.0030.01016.23
7.1.140.0090.00616.19
7.1.130.0090.00516.39
7.1.120.0000.01716.19
7.1.110.0060.00616.01
7.1.100.0070.00817.22
7.1.90.0090.00616.21
7.1.80.0150.00016.37
7.1.70.0050.00616.71
7.1.60.0060.01117.86
7.1.50.0110.00816.76
7.1.40.0050.01015.96
7.1.30.0030.00716.37
7.1.20.0060.00616.25
7.1.10.0000.01416.34
7.1.00.0070.03919.27
7.0.330.0090.00616.06
7.0.320.0040.00715.95
7.0.310.0040.00815.90
7.0.300.0070.00715.55
7.0.290.0030.00615.96
7.0.280.0030.01215.75
7.0.270.0080.00416.00
7.0.260.0070.00715.72
7.0.250.0060.00615.83
7.0.240.0070.00416.14
7.0.230.0090.00615.69
7.0.220.0080.00415.97
7.0.210.0060.00916.10
7.0.200.0020.01016.54
7.0.190.0090.00015.77
7.0.180.0070.00716.06
7.0.170.0030.01015.77
7.0.160.0040.01115.67
7.0.150.0060.00616.15
7.0.140.0000.04419.08
7.0.130.0070.01016.03
7.0.120.0070.00715.97
7.0.110.0000.01515.71
7.0.100.0000.00915.75
7.0.90.0000.01316.04
7.0.80.0070.00715.97
7.0.70.0070.00316.00
7.0.60.0060.02418.10
7.0.50.0050.04717.00
7.0.40.0090.02317.10
7.0.30.0120.02817.08
7.0.20.0170.02816.98
7.0.10.0060.02117.15
7.0.00.0020.03316.89
5.6.400.0040.01114.52
5.6.390.0040.01114.63
5.6.380.0030.01015.06
5.6.370.0030.01014.64
5.6.360.0070.00714.45
5.6.350.0000.00915.00
5.6.340.0090.00614.66
5.6.330.0070.00714.85
5.6.320.0030.01014.98
5.6.310.0040.01114.41
5.6.300.0130.00014.71
5.6.290.0060.00315.16
5.6.280.0030.04217.78
5.6.270.0060.00815.02
5.6.260.0100.00014.66
5.6.250.0060.00614.82
5.6.240.0030.01214.48
5.6.230.0000.01414.61
5.6.220.0060.00314.53
5.6.210.0020.02617.65
5.6.200.0080.04016.35
5.6.190.0090.04517.56
5.6.180.0140.02017.60
5.6.170.0080.02517.55
5.6.160.0040.03717.54
5.6.150.0050.04616.46
5.6.140.0050.04516.64
5.6.130.0050.03116.57
5.6.120.0040.03717.96
5.6.110.0070.03718.06
5.6.100.0110.03817.86
5.6.90.0120.04718.03
5.6.80.0110.04017.51
5.6.70.2100.02117.40
5.6.60.0090.00614.56
5.6.50.0040.01214.63
5.6.40.0030.01014.63
5.6.30.0100.00714.81
5.6.20.0070.00714.47
5.6.10.0090.00614.86
5.6.00.0040.00414.72
5.5.380.0030.01014.49
5.5.370.0120.00314.65
5.5.360.0000.01114.48
5.5.350.0050.04617.50
5.5.340.0080.04016.38
5.5.330.0080.03117.64
5.5.320.0230.03817.54
5.5.310.0200.03617.51
5.5.300.0070.03916.28
5.5.290.0070.04116.23
5.5.280.0050.02217.76
5.5.270.0050.02317.93
5.5.260.0090.03717.72
5.5.250.0060.02417.49
5.5.240.0130.04517.42
5.5.230.0110.00614.52
5.5.220.0030.00914.39
5.5.210.0040.01114.66
5.5.200.0080.00814.28
5.5.190.0000.01814.68
5.5.180.0060.00914.50
5.5.170.0060.00614.36
5.5.160.0060.00314.29
5.5.150.0080.00414.65
5.5.140.0030.01014.68
5.5.130.0000.01414.60
5.5.120.0110.00014.48
5.5.110.0090.00314.37
5.5.100.0000.01214.38
5.5.90.0030.00714.54
5.5.80.0000.01414.30
5.5.70.0030.01314.43
5.5.60.0000.01314.66
5.5.50.0030.01414.20
5.5.40.0060.00914.36
5.5.30.0030.01514.32
5.5.20.0000.01114.37
5.5.10.0070.01014.31
5.5.00.0100.00714.45
5.4.450.0020.02515.28
5.4.440.0060.01815.21
5.4.430.0000.03015.26
5.4.420.0050.04315.38
5.4.410.0050.03915.28
5.4.400.0080.02614.96
5.4.390.0030.04515.10
5.4.380.0050.02315.12
5.4.370.0030.02315.08
5.4.360.0000.02915.25
5.4.350.0020.03715.06
5.4.340.0020.04015.07
5.4.330.0030.00711.23
5.4.320.0000.03015.09
5.4.310.0060.02615.21
5.4.300.0070.03015.21
5.4.290.0050.04115.17
5.4.280.0000.03914.95
5.4.270.0050.03814.97
5.4.260.0020.04115.07
5.4.250.0090.03315.04
5.4.240.0050.03915.06
5.4.230.0040.02815.07
5.4.220.0020.04515.05
5.4.210.0050.02715.14
5.4.200.0060.04315.06
5.4.190.0050.02314.96
5.4.180.0100.03714.88
5.4.170.0030.04414.95
5.4.160.0100.03814.93
5.4.150.0000.04615.13
5.4.140.0060.03613.77
5.4.130.0070.03713.56
5.4.120.0040.03213.86
5.4.110.0000.03813.89
5.4.100.0020.03913.85
5.4.90.0040.03213.75
5.4.80.0030.03513.56
5.4.70.0030.04013.82
5.4.60.0090.03013.85
5.4.50.0020.04313.86
5.4.40.0020.02913.85
5.4.30.0040.03813.51
5.4.20.0050.03713.82
5.4.10.0020.02913.62
5.4.00.0030.04013.40
5.3.290.0020.03812.57
5.3.280.0060.02012.53
5.3.270.0090.03012.53
5.3.260.0070.04012.53
5.3.250.0060.02812.57
5.3.240.0090.03512.45
5.3.230.0000.04012.51
5.3.220.0050.02712.53
5.3.210.0040.03312.42
5.3.200.0010.03912.52
5.3.190.0040.03112.56
5.3.180.0020.03112.42
5.3.170.0030.03512.41
5.3.160.0040.03912.46
5.3.150.0030.04012.49
5.3.140.0070.03812.49
5.3.130.0030.03212.56
5.3.120.0050.03812.49
5.3.110.0070.03512.48
5.3.100.0070.03512.14
5.3.90.0000.03712.16
5.3.80.0020.04012.05
5.3.70.0050.02212.08
5.3.60.0030.02312.20
5.3.50.0030.02811.95
5.3.40.0030.04012.04
5.3.30.0050.03712.09
5.3.20.0030.03812.01
5.3.10.0030.02511.81
5.3.00.0080.02011.86
5.2.170.0030.04712.15
5.2.160.0030.06312.15
5.2.150.0070.06012.15
5.2.140.0000.06012.15
5.2.130.0000.06712.15
5.2.120.0030.06012.15
5.2.110.0030.04012.15
5.2.100.0030.06012.15
5.2.90.0030.03712.15
5.2.80.0100.04712.15
5.2.70.0000.05712.15
5.2.60.0000.05012.15
5.2.50.0030.03012.15
5.2.40.0070.02312.15
5.2.30.0000.03312.15
5.2.20.0070.06012.15
5.2.10.0030.04312.15
5.2.00.0000.05312.15
5.1.60.0030.05312.15
5.1.50.0100.04012.15
5.1.40.0030.03712.15
5.1.30.0030.05312.15
5.1.20.0030.05012.15
5.1.10.0070.05012.15
5.1.00.0070.05012.15
5.0.50.0030.04712.15
5.0.40.0000.04712.15
5.0.30.0030.06712.15
5.0.20.0000.04312.15
5.0.10.0000.04312.15
5.0.00.0030.04012.15
4.4.90.0030.02712.15
4.4.80.0000.02012.15
4.4.70.0000.02312.15
4.4.60.0000.03312.15
4.4.50.0070.02312.15
4.4.40.0000.04712.15
4.4.30.0030.02712.15
4.4.20.0030.03712.15
4.4.10.0030.03712.15
4.4.00.0030.05312.15
4.3.110.0000.02712.15
4.3.100.0030.03312.15
4.3.90.0000.02312.15
4.3.80.0000.03312.15
4.3.70.0030.03312.15
4.3.60.0030.03312.15
4.3.50.0030.03012.15
4.3.40.0030.04312.15
4.3.30.0030.03712.15
4.3.20.0000.03012.15
4.3.10.0000.03712.15
4.3.00.0000.03312.15

preferences:
51.21 ms | 401 KiB | 5 Q