3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); $text = <<<EOF Нет пробела после запятой,либо после точки с запятой;а иногда и даже после таких знаков:восклицательного!И даже вопросительного.Найдет ли мой скрипт такую ошибку?Посмотрим. "Жи" и "ши" мы пишем с буквой "и" в словах "шына", "жывотное" и др. В тексте есть слово "координально", "сдесь", "зделол", "зделан" а также "зделою" но нет слова "чюдо" и "щюка". EOF ; //$regexp = '/(\b[а-яё]+),([а-яё]+\b)|(\b[а-яё]+);([а-яё]+\b)|(\b[а-яё]+)!([а-яё]+\b)|(\b[а-яё]+)\\.([а-яё]+\b)|(\b[а-яё]+)\\?([а-яё]+\b)/ui'; //$regexp = '/\bз(д[а-яё]+)\b/ui'; //$regexp = '/[а-яё]*(жы|шы)[а-яё]*/ui'; $regexp = '/[а-яё]*((чю)|(щю))[а-яё]*/ui'; $text = checking($text, $regexp, 4); //$regexp = '/сдесь/ui'; //$text = checking($text, $regexp, 5); //$regexp = '/координал[а-яё]+/ui'; //$text = checking($text, $regexp, 6); echo $text; function checking($text, $regexp, $type){ $error = false; $matches = array(); $count = preg_match_all($regexp, $text, $matches); foreach ($matches[0] as $element){ echo "В тексте найдена ошибка: {$element}\n"; $error = true; echo "$count\n"; var_dump($matches); } if ($error == true){ $text = fixError($text, $regexp, $type); return $text; } } function fixError($text, $regexp, $type){ if ($type == 5){ $text = preg_replace($regexp, 'здесь', $text); }else if($type == 6){ $text = preg_replace($regexp, 'кардинально', $text); } return $text; }

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.01218.64
8.3.50.0070.01018.68
8.3.40.0150.00419.13
8.3.30.0110.00719.09
8.3.20.0080.00020.24
8.3.10.0000.00720.24
8.3.00.0030.00623.61
8.2.180.0160.00618.91
8.2.170.0150.00022.96
8.2.160.0120.00320.30
8.2.150.0050.00324.18
8.2.140.0000.00924.66
8.2.130.0040.00420.33
8.2.120.0080.00026.35
8.2.110.0040.00719.31
8.2.100.0000.01118.16
8.2.90.0050.00319.19
8.2.80.0040.00417.97
8.2.70.0030.00617.88
8.2.60.0000.00818.05
8.2.50.0050.00318.16
8.2.40.0080.00022.15
8.2.30.0040.00420.48
8.2.20.0040.00418.31
8.2.10.0040.00418.15
8.2.00.0000.00818.29
8.1.280.0080.00825.92
8.1.270.0030.00524.02
8.1.260.0040.00426.35
8.1.250.0070.00428.09
8.1.240.0110.00022.13
8.1.230.0080.00420.97
8.1.220.0080.00017.78
8.1.210.0060.00318.77
8.1.200.0030.00717.48
8.1.190.0040.00417.47
8.1.180.0000.00818.10
8.1.170.0030.00618.71
8.1.160.0040.00419.05
8.1.150.0090.00020.22
8.1.140.0040.00422.16
8.1.130.0030.00319.13
8.1.120.0040.00417.66
8.1.110.0070.00317.52
8.1.100.0050.00317.63
8.1.90.0030.00717.61
8.1.80.0000.00717.69
8.1.70.0040.00417.63
8.1.60.0000.00817.75
8.1.50.0000.00817.56
8.1.40.0050.00317.61
8.1.30.0000.00817.66
8.1.20.0000.00817.70
8.1.10.0040.00417.82
8.1.00.0000.00717.55
8.0.300.0080.00018.77
8.0.290.0040.00417.13
8.0.280.0000.00718.41
8.0.270.0040.00416.99
8.0.260.0030.00317.21
8.0.250.0000.00717.27
8.0.240.0030.00617.15
8.0.230.0070.00017.27
8.0.220.0030.00317.25
8.0.210.0070.00017.29
8.0.200.0000.00717.28
8.0.190.0000.00717.19
8.0.180.0000.00817.19
8.0.170.0000.00717.20
8.0.160.0000.00717.27
8.0.150.0040.00417.21
8.0.140.0000.00717.16
8.0.130.0040.00413.64
8.0.120.0000.00817.21
8.0.110.0040.00417.32
8.0.100.0070.00017.32
8.0.90.0030.00517.14
8.0.80.0150.00617.19
8.0.70.0050.00317.37
8.0.60.0070.00017.30
8.0.50.0000.00817.15
8.0.30.0110.00917.23
8.0.20.0120.00817.43
8.0.10.0040.00417.21
8.0.00.0160.00917.26
7.4.330.0020.00215.55
7.4.320.0000.00616.91
7.4.300.0030.00316.80
7.4.290.0000.00716.89
7.4.280.0070.00316.79
7.4.270.0000.00816.79
7.4.260.0040.00416.64
7.4.250.0040.00416.88
7.4.240.0030.00616.91
7.4.230.0000.00716.86
7.4.220.0070.01116.89
7.4.210.0030.01416.98
7.4.200.0070.00016.91
7.4.160.0100.01016.86
7.4.150.0150.00617.40
7.4.140.0110.01317.86
7.4.130.0140.00416.80
7.4.120.0100.00916.85
7.4.110.0140.00716.93
7.4.100.0130.00616.87
7.4.90.0120.00616.70
7.4.80.0070.01119.39
7.4.70.0060.01216.80
7.4.60.0150.00416.71
7.4.50.0030.01416.63
7.4.40.0090.00916.86
7.4.30.0060.01016.62
7.4.00.0110.00415.29
7.3.330.0060.00013.52
7.3.320.0060.00013.68
7.3.310.0000.00816.70
7.3.300.0000.00616.63
7.3.290.0040.01016.66
7.3.280.0130.00716.70
7.3.270.0120.00617.40
7.3.260.0140.00516.80
7.3.250.0080.01016.78
7.3.240.0090.01316.70
7.3.230.0040.01416.76
7.3.210.0160.00416.74
7.3.200.0100.01416.77
7.3.190.0100.00716.67
7.3.180.0070.01016.73
7.3.170.0100.01016.64
7.3.160.0090.00916.75
7.3.120.0090.00614.88
7.3.110.0100.00315.34
7.3.100.0070.00414.88
7.3.90.0040.01115.14
7.3.80.0000.01415.03
7.3.70.0070.01115.04
7.3.60.0110.00415.07
7.3.50.0030.01315.08
7.3.40.0100.00715.24
7.3.30.0060.00614.77
7.3.20.0070.01116.95
7.3.10.0070.01016.94
7.3.00.0080.00817.02
7.2.330.0130.00716.82
7.2.320.0090.00916.98
7.2.310.0060.01216.95
7.2.300.0060.01316.77
7.2.290.0130.00916.93
7.2.240.0060.01015.41
7.2.230.0090.00915.16
7.2.220.0060.00615.42
7.2.210.0060.00915.34
7.2.200.0090.00915.40
7.2.190.0070.01115.24
7.2.180.0090.00615.06
7.2.170.0070.01115.16
7.2.160.0080.00814.94
7.2.150.0070.01017.26
7.2.140.0030.00917.14
7.2.130.0030.01417.22
7.2.120.0110.00717.11
7.2.110.0100.00317.21
7.2.100.0040.01117.23
7.2.90.0070.01017.32
7.2.80.0070.01017.02
7.2.70.0080.00517.01
7.2.60.0080.00717.19
7.2.50.0040.01517.11
7.2.40.0000.01317.09
7.2.30.0060.01017.15
7.2.20.0030.01217.13
7.2.10.0090.00617.18
7.2.00.0030.01517.11
7.1.330.0040.01216.18
7.1.320.0060.00916.10
7.1.310.0070.00716.23
7.1.300.0080.00816.19
7.1.290.0070.01116.15
7.1.280.0150.00016.09
7.1.270.0070.00315.97
7.1.260.0060.00616.01
7.1.250.0060.00915.91
7.1.200.0060.00616.04
7.1.70.0080.00317.46
7.1.60.0030.00717.63
7.1.30.2800.09036.48
7.1.20.2670.06036.45
7.1.10.3670.08320.42
7.1.00.2630.06020.71
7.0.200.0140.01116.92
7.0.170.2700.06320.01
7.0.160.2870.06320.11
7.0.150.3030.06720.07
7.0.140.3270.06020.06
7.0.130.3070.04320.06
7.0.120.2730.05720.19
7.0.110.2900.05320.10
7.0.100.3830.06720.18
7.0.90.3730.07020.08
7.0.80.0270.06320.13
7.0.70.3430.06020.13
7.0.60.4000.05319.99
7.0.50.3000.06320.10
7.0.40.2630.06320.13
7.0.30.3030.07720.08
7.0.20.2170.04720.10
7.0.10.3630.07320.14
7.0.00.2300.07020.15

preferences:
36.09 ms | 400 KiB | 5 Q