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.40.0150.00619.14
8.3.30.0030.01419.09
8.3.20.0070.00020.38
8.3.10.0080.00023.66
8.3.00.0000.00819.36
8.2.170.0140.00422.96
8.2.160.0080.00520.64
8.2.150.0040.00424.18
8.2.140.0070.01024.66
8.2.130.0040.00426.16
8.2.120.0000.00921.09
8.2.110.0080.00020.77
8.2.100.0040.00818.28
8.2.90.0080.00018.03
8.2.80.0030.00517.97
8.2.70.0030.00618.00
8.2.60.0080.00018.04
8.2.50.0000.00818.13
8.2.40.0040.00420.07
8.2.30.0090.00018.51
8.2.20.0050.00318.16
8.2.10.0030.00518.39
8.2.00.0090.00018.20
8.1.270.0050.00524.21
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00422.21
8.1.230.0080.00424.11
8.1.220.0060.00317.90
8.1.210.0040.00419.22
8.1.200.0040.00417.61
8.1.190.0000.00817.72
8.1.180.0040.00418.10
8.1.170.0000.00819.04
8.1.160.0000.00722.28
8.1.150.0070.00018.94
8.1.140.0000.00917.75
8.1.130.0030.00318.07
8.1.120.0000.00717.91
8.1.110.0000.00817.75
8.1.100.0040.00417.98
8.1.90.0070.00317.74
8.1.80.0040.00417.84
8.1.70.0050.00317.82
8.1.60.0090.00017.87
8.1.50.0040.00417.95
8.1.40.0000.00817.85
8.1.30.0040.00417.92
8.1.20.0020.00518.03
8.1.10.0040.00417.86
8.1.00.0040.00417.89
8.0.300.0070.00020.16
8.0.290.0000.00916.88
8.0.280.0000.00718.65
8.0.270.0070.00017.37
8.0.260.0030.00317.45
8.0.250.0000.00717.36
8.0.240.0030.00317.35
8.0.230.0040.00417.41
8.0.220.0030.00317.28
8.0.210.0030.00317.29
8.0.200.0000.00817.38
8.0.190.0000.00817.32
8.0.180.0040.00417.28
8.0.170.0040.00417.29
8.0.160.0040.00417.34
8.0.150.0040.00417.32
8.0.140.0000.00717.28
8.0.130.0000.00513.70
8.0.120.0040.00417.22
8.0.110.0000.00817.31
8.0.100.0040.00417.11
8.0.90.0000.00717.17
8.0.80.0070.01417.16
8.0.70.0050.00317.09
8.0.60.0070.00017.08
8.0.50.0070.00017.08
8.0.30.0110.00917.37
8.0.20.0090.01417.51
8.0.10.0000.00817.34
8.0.00.0110.00816.93
7.4.330.0050.00015.11
7.4.320.0030.00516.97
7.4.300.0060.00016.93
7.4.290.0030.00516.88
7.4.280.0060.00316.82
7.4.270.0000.00716.77
7.4.260.0070.00016.88
7.4.250.0000.00716.87
7.4.240.0020.00616.85
7.4.230.0000.00817.04
7.4.220.0110.00916.90
7.4.210.0120.00916.94
7.4.200.0030.00316.88
7.4.190.0000.00716.80
7.4.160.0080.00816.94
7.4.150.0120.00617.40
7.4.140.0030.01617.86
7.4.130.0130.00816.93
7.4.120.0040.01316.90
7.4.110.0030.01516.83
7.4.100.0000.01716.59
7.4.90.0090.00916.73
7.4.80.0090.01219.39
7.4.70.0120.01216.90
7.4.60.0130.00316.77
7.4.50.0030.00316.84
7.4.40.0090.00916.77
7.4.30.0080.00816.96
7.4.00.0070.00715.37
7.3.330.0030.00413.54
7.3.320.0060.00013.38
7.3.310.0030.00316.68
7.3.300.0070.00016.71
7.3.290.0110.00416.74
7.3.280.0070.01216.66
7.3.270.0090.00917.40
7.3.260.0060.01216.76
7.3.250.0060.01116.70
7.3.240.0150.00316.62
7.3.230.0060.01216.71
7.3.210.0060.01216.73
7.3.200.0090.01519.39
7.3.190.0190.00316.79
7.3.180.0070.01016.75
7.3.170.0210.00016.87
7.3.160.0170.00316.79
7.3.120.0030.01215.37
7.3.10.0060.00916.96
7.3.00.0050.00616.91
7.2.330.0180.00016.68
7.2.320.0110.00816.56
7.2.310.0080.01116.69
7.2.300.0070.01016.95
7.2.290.0110.01216.62
7.2.130.0090.00617.01
7.2.120.0090.00417.07
7.2.110.0050.01016.96
7.2.100.0040.01417.04
7.2.90.0030.01217.16
7.2.80.0080.00817.25
7.2.70.0040.00817.01
7.2.60.0010.01317.14
7.2.50.0060.01116.84
7.2.40.0030.01517.06
7.2.30.0030.01117.01
7.2.20.0050.01217.00
7.2.10.0020.01016.98
7.2.00.0020.01117.85
7.1.250.0100.00315.97
7.1.240.0050.01015.84
7.1.230.0000.01516.14
7.1.220.0070.01015.88
7.1.210.0130.00316.14
7.1.200.0090.00816.15
7.1.190.0090.00916.16
7.1.180.0080.00816.16
7.1.170.0040.01216.38
7.1.160.0080.01116.21
7.1.150.0070.01016.17
7.1.140.0000.02015.84
7.1.130.0060.01216.18
7.1.120.0090.00916.24
7.1.110.0040.01416.32
7.1.100.0090.00817.46
7.1.90.0160.00016.37
7.1.80.0070.01016.29
7.1.70.0100.00616.86
7.1.60.0100.00917.92
7.1.50.0070.01316.74
7.1.40.0110.00416.10
7.1.30.0090.00616.11
7.1.20.0060.00616.08
7.1.10.0030.01016.21
7.1.00.0080.04219.27
7.0.330.0110.00515.64
7.0.320.0090.00616.05
7.0.310.0000.01715.95
7.0.300.0140.00015.80
7.0.290.0070.00715.71
7.0.280.0080.01115.72
7.0.270.0150.00015.82
7.0.260.0060.01315.68
7.0.250.0170.00915.75
7.0.240.0070.01316.02
7.0.230.0070.01015.88
7.0.220.0090.00615.66
7.0.210.0060.00615.41
7.0.200.0040.00716.52
7.0.190.0100.00915.73
7.0.180.0030.01315.88
7.0.170.0070.00416.02
7.0.160.0070.00715.98
7.0.150.0090.00916.00
7.0.140.0090.04819.03
7.0.130.0090.00616.00
7.0.120.0100.00615.97
7.0.110.0120.00315.78
7.0.100.0090.00315.87
7.0.90.0060.00915.90
7.0.80.0070.01015.73
7.0.70.0080.00815.75
7.0.60.0030.02617.95
7.0.50.0100.04217.04
7.0.40.0080.02217.06
7.0.30.0130.02617.09
7.0.20.0220.04017.09
7.0.10.0170.04416.99
7.0.00.0050.04217.05
5.6.380.0060.00914.69
5.6.370.0030.01414.61
5.6.360.0110.00314.86
5.6.350.0060.00914.93
5.6.340.0060.01114.86
5.6.330.0060.00914.82
5.6.320.0030.00914.48
5.6.310.0070.00714.38
5.6.300.0070.00414.65
5.6.290.0040.01214.87
5.6.280.0080.03717.62
5.6.270.0100.00714.91
5.6.260.0160.00014.77
5.6.250.0080.00814.56
5.6.240.0060.00914.65
5.6.230.0000.01714.69
5.6.220.0090.00314.71
5.6.210.0020.03317.76
5.6.200.0050.03416.56
5.6.190.0080.04417.71
5.6.180.1830.01917.62
5.6.170.0260.04017.51
5.6.160.0030.03717.39
5.6.150.0060.02816.49
5.6.140.0110.01816.52
5.6.130.0050.03016.42
5.6.120.0100.04117.72
5.6.110.0080.04617.79
5.6.100.0110.04717.93
5.6.90.0080.04817.97
5.6.80.0110.03517.44
5.6.70.0030.01614.62
5.6.60.0070.01014.37
5.6.50.0040.01314.80
5.6.40.0090.00614.67
5.6.30.0000.01814.31
5.6.20.0150.00314.79
5.6.10.0050.00514.62
5.6.00.0030.01414.59
5.5.380.0070.00311.53
5.5.370.0030.01011.36
5.5.360.0060.00611.54
5.5.350.0150.04015.93
5.5.340.0040.02414.71
5.5.330.0080.03015.83
5.5.320.0250.02715.85
5.5.310.0150.04515.88
5.5.300.0070.04114.64
5.5.290.0040.02414.62
5.5.280.0030.03016.10
5.5.270.0100.02816.12
5.5.260.0080.02016.14
5.5.250.0100.02016.14
5.5.240.0060.04315.83
5.5.230.0080.00611.18
5.5.220.0030.01011.31
5.5.210.0080.00511.25
5.5.200.0090.00311.27
5.5.190.0000.01311.18
5.5.180.0070.00411.42
5.5.170.0060.00611.40
5.5.160.0000.01411.20
5.5.150.0080.00511.41
5.5.140.0090.00311.56
5.5.130.0100.00311.33
5.5.120.0000.01211.18
5.5.110.0060.00911.34
5.5.100.0080.00311.41
5.5.90.0070.00711.54
5.5.80.0030.00911.27
5.5.70.0060.00811.41
5.5.60.0030.00511.39
5.5.50.0060.00611.36
5.5.40.0060.00611.21
5.5.30.0050.00211.18
5.5.20.0030.00911.39
5.5.10.0060.00611.18
5.5.00.0070.00711.57
5.4.450.0100.02115.35
5.4.440.0060.03015.51
5.4.430.0070.04415.33
5.4.420.0070.02115.21
5.4.410.0030.04415.35
5.4.400.0090.03515.18
5.4.390.0030.04814.99
5.4.380.0070.03815.17
5.4.370.0040.03715.15
5.4.360.0050.02615.04
5.4.350.0070.03815.13
5.4.340.0050.04415.25
5.4.330.0070.00411.18
5.4.320.0050.03515.19
5.4.310.0060.03915.16
5.4.300.0090.04115.04
5.4.290.0060.02315.16
5.4.280.0020.02915.18
5.4.270.0060.03415.14
5.4.260.0050.02815.00
5.4.250.0040.04115.17
5.4.240.0120.03814.99
5.4.230.0050.03415.11
5.4.220.0020.04815.16
5.4.210.0040.02815.13
5.4.200.0110.02815.18
5.4.190.0030.02815.15
5.4.180.0040.04515.04
5.4.170.0070.03315.18
5.4.160.0030.03115.21
5.4.150.0080.03915.13
5.4.140.0110.02113.79
5.4.130.0090.03513.85
5.4.120.0020.04113.93
5.4.110.0050.03913.78
5.4.100.0060.03613.74
5.4.90.0080.03013.75
5.4.80.0120.03713.81
5.4.70.0070.03713.73
5.4.60.0030.03813.70
5.4.50.0110.02713.77
5.4.40.0050.04313.76
5.4.30.0030.03613.76
5.4.20.0030.02313.77
5.4.10.0090.02013.76
5.4.00.0090.03513.45
5.3.290.0060.03812.89
5.3.280.0050.03912.87
5.3.270.0050.04112.87
5.3.260.0050.04112.87
5.3.250.0060.03812.86
5.3.240.0030.04312.84
5.3.230.0010.03312.85
5.3.220.0130.03512.86
5.3.210.0050.04012.88
5.3.200.0050.04112.84
5.3.190.0050.04312.78
5.3.180.0050.04012.91
5.3.170.0030.03012.83
5.3.160.0030.04112.78
5.3.150.0080.03812.88
5.3.140.0060.03312.83
5.3.130.0050.03612.84
5.3.120.0050.02512.90
5.3.110.0050.03512.82
5.3.100.0020.03912.66
5.3.90.0060.03912.51
5.3.80.0030.03512.61
5.3.70.0060.02912.56
5.3.60.0030.04312.55
5.3.50.0050.03412.54
5.3.40.0030.04212.57
5.3.30.0030.04112.44
5.3.20.0070.02212.41
5.3.10.0020.03112.39
5.3.00.0060.02312.31
5.2.170.0050.02811.11
5.2.160.0040.03211.13
5.2.150.0020.03311.13
5.2.140.0030.02811.15
5.2.130.0060.02511.11
5.2.120.0100.02511.09
5.2.110.0050.01611.08
5.2.100.0030.01811.13
5.2.90.0060.03011.14
5.2.80.0070.03211.08
5.2.70.0030.01811.14
5.2.60.0030.02011.19
5.2.50.0030.03611.08
5.2.40.0020.02911.04
5.2.30.0030.03311.04
5.2.20.0030.03511.06
5.2.10.0020.02611.01
5.2.00.0030.03310.87
5.1.60.0000.03010.63
5.1.50.0040.03010.54
5.1.40.0070.01210.57
5.1.30.0050.02210.83
5.1.20.0030.03010.70
5.1.10.0040.01810.61
5.1.00.0030.02510.62
5.0.50.0050.02510.10
5.0.40.0020.01310.10
5.0.30.0020.01910.10
5.0.20.0020.01210.10
5.0.10.0030.01010.10
5.0.00.0020.01910.10
4.4.90.0020.01210.10
4.4.80.0000.02210.10
4.4.70.0030.01310.10
4.4.60.0020.01810.10
4.4.50.0010.02010.10
4.4.40.0000.03210.10
4.4.30.0020.01310.10
4.4.20.0020.01010.10
4.4.10.0020.01810.10
4.4.00.0060.01610.10
4.3.110.0020.01210.10
4.3.100.0030.00810.10
4.3.90.0050.00910.10
4.3.80.0020.01510.10
4.3.70.0020.01010.10
4.3.60.0050.00710.10
4.3.50.0020.01210.10
4.3.40.0000.01510.10
4.3.30.0000.01210.10
4.3.20.0020.01210.10
4.3.10.0030.00810.10
4.3.00.0000.00910.10

preferences:
43.63 ms | 400 KiB | 5 Q