3v4l.org

run code in 300+ PHP versions simultaneously
<?php $defolttext = ""; error_reporting(-1); if (!isset($_REQUEST['submit'])) { $text = ""; } else{ $text = $_REQUEST['text']; $clearbrpbi = array("<br>" => " ", "<br />" => " ", "<p>" => " ", "</p>" => "", "<i>" => "", "</i>" => "", "<b>" => "", "</b>" => "", "<" => "", ">" => "", '"' => ''); $cleartext = strtr($text, $clearbrpbi); $words = explode(" ", $cleartext); $curword = ""; $allwords = ""; $curwordsylamt = 0; $wor = 0; $wordsylamtall = 0; foreach ($words as $k => $v){ $curword = $v; $curwordsylamt = strlen($curword)/2.5;//количество слогов в текущем слове $wordssenarr[] = $curwordsylamt; $allwords .= $curword; $wordsylamtall += $curwordsylamt; $wor++;//счетчик слов } $nospaces = implode("", $words); $nospaceslen = strlen($nospaces);//общеее количество букв без пробелов $syllablesamt = $nospaceslen/2.5; $sentences = explode(".", $cleartext); $sentencesamt = count($sentences); $senwords = array(); $wordssenarr = array(); $sen = 0; $wordssenamt = 0; $wordssenamtall = 0; foreach ($sentences as $k => $v){ $senwords = explode(" ", $v); $wordssenamt = count($senwords);//количество слов в текущем предложении $wordssenarr[] = $wordssenamt; $wordssenamtall += $wordssenamt; $sen++;//счетчик предложений } $avg_sense_length_inwords = $wordssenamtall/$sen; $avg_words_length_insyllables = array_sum($wordssenarr)/$wor; $ASL = $avg_sense_length_inwords; $ASW = $avg_words_length_insyllables; $wordsamt = count($words); $textlen = strlen($cleartext); $FRE1 = 206.835 - 1.015*($wordsamt/$sentencesamt) - 84.6*($syllablesamt/$wordsamt); $FRE2 = 206.835 - (1.015*$ASL) - (84.6*$ASW); //$FleschKincaidGradeLevel= 0.39*(total words/total sentences)+11.8*(total syllables/total words)-15.59; $FleschKincaidGradeLevel= 0.39*($wordsamt/$sentencesamt)+11.8*($syllablesamt/$wordsamt)-15.59; $text = "Читаемость вашего текста равна FRE1 = $FRE1 ,FRE2 = $FRE2<br /><br /> Читаемость вашего текста по Flesch–Kincaid Grade Level равна FleschKincaidGradeLevel= 0.39(wordsamt/sentencesamt)+11.8(syllablesamt/wordsamt)-15.59 = 0.39($wordsamt\/$sentencesamt)\+11.8\($syllablesamt\/$wordsamt)\-15.59 = $FleschKincaidGradeLevel <br /><br /> <pre>".print_r($GLOBALS, true)."</pre>"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru"> <body> <h2>Проверка читаемости текста по индексу Флеша</h2><br /> <?php echo $text; ?> <br /> <br /> <form action="" method=post> Ввведите текста у которого нужно проверить читаемость:<br /> <textarea name="text" rows="10" cols="45"> <?php echo $defolttext; ?></textarea><br /> <input type='submit' name='submit' value='Проверить' /> <hr> </form> </body> </html>

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.0120.00616.75
8.3.50.0070.01017.43
8.3.40.0000.01518.85
8.3.30.0070.00718.68
8.3.20.0040.00418.60
8.3.10.0060.00318.77
8.3.00.0040.00419.26
8.2.180.0110.01116.50
8.2.170.0090.00622.96
8.2.160.0060.01620.64
8.2.150.0090.00024.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.05
8.2.110.0100.00020.20
8.2.100.0080.00419.63
8.2.90.0000.00817.75
8.2.80.0030.00618.80
8.2.70.0090.00017.50
8.2.60.0050.00317.50
8.2.50.0080.00018.05
8.2.40.0040.00419.62
8.2.30.0060.00317.85
8.2.20.0060.00317.78
8.2.10.0080.00017.76
8.2.00.0100.00017.59
8.1.280.0140.00325.92
8.1.270.0090.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.76
8.1.230.0110.00017.83
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0000.00917.22
8.1.190.0080.00017.23
8.1.180.0050.00318.10
8.1.170.0040.00417.62
8.1.160.0000.00718.97
8.1.150.0000.00818.60
8.1.140.0000.00717.45
8.1.130.0000.00817.36
8.1.120.0030.00517.50
8.1.110.0080.00017.35
8.1.100.0040.00417.42
8.1.90.0040.00417.41
8.1.80.0040.00417.38
8.1.70.0030.00517.45
8.1.60.0000.00817.70
8.1.50.0070.00017.61
8.1.40.0080.00017.53
8.1.30.0080.00017.52
8.1.20.0030.00517.58
8.1.10.0040.00417.64
8.1.00.0040.00417.49
8.0.300.0000.00818.77
8.0.290.0060.00316.88
8.0.280.0030.00318.45
8.0.270.0000.00717.29
8.0.260.0110.00016.90
8.0.250.0030.00516.91
8.0.240.0050.00216.95
8.0.230.0070.00016.89
8.0.220.0000.00816.82
8.0.210.0050.00216.83
8.0.200.0030.00317.03
8.0.190.0030.00617.05
8.0.180.0110.00016.97
8.0.170.0080.00416.92
8.0.160.0050.00316.96
8.0.150.0040.00416.91
8.0.140.0060.00616.82
8.0.130.0050.00013.32
8.0.120.0070.00416.85
8.0.110.0040.00416.87
8.0.100.0020.00516.80
8.0.90.0000.00716.79
8.0.80.0150.00016.92
8.0.70.0090.00016.92
8.0.60.0040.00516.83
8.0.50.0040.00416.93
8.0.30.0000.01517.00
8.0.20.0100.00817.04
8.0.10.0040.00417.01
8.0.00.0150.00416.91
7.4.330.0000.00513.02
7.4.320.0060.00016.55
7.4.300.0030.00316.62
7.4.290.0110.00016.54
7.4.280.0070.00016.54
7.4.270.0040.00416.55
7.4.260.0060.00013.43
7.4.250.0080.00016.42
7.4.240.0030.00316.53
7.4.230.0000.00716.45
7.4.220.0150.01216.60
7.4.210.0060.01016.73
7.4.200.0050.00516.59
7.4.190.0040.00416.63
7.4.160.0120.00316.63
7.4.150.0150.00916.70
7.4.140.0110.00717.86
7.4.130.0060.01916.70
7.4.120.0060.01216.60
7.4.110.0110.00716.50
7.4.100.0130.00716.44
7.4.90.0090.00916.43
7.4.80.0060.01019.39
7.4.70.0060.01216.53
7.4.60.0060.01116.59
7.4.50.0030.00316.39
7.4.40.0030.01316.41
7.4.30.0110.00916.62
7.4.00.0110.00415.00
7.3.330.0060.00013.15
7.3.320.0030.00313.09
7.3.310.0040.00416.21
7.3.300.0030.00316.13
7.3.290.0060.01116.25
7.3.280.0100.00716.27
7.3.270.0040.01516.55
7.3.260.0180.00616.18
7.3.240.0120.00616.38
7.3.230.0100.01316.34
7.3.210.0140.00816.39
7.3.200.0140.00816.42
7.3.190.0060.00916.26
7.3.180.0100.00716.34
7.3.170.0140.00516.37
7.3.160.0080.00816.30
7.3.120.0070.00714.63
7.2.330.0080.00816.54
7.2.320.0110.01516.38
7.2.310.0030.01516.49
7.2.300.0140.00716.46
7.2.290.0070.01116.62
7.2.00.0070.00719.36
7.1.100.0310.00017.36
7.1.70.0050.00217.13
7.1.60.0060.01919.25
7.1.50.0120.00916.89
7.1.00.0030.06722.54
7.0.200.0030.00716.37
7.0.140.0070.07021.95
7.0.120.0030.07322.15
7.0.60.0100.07719.86
7.0.50.0130.06317.85
7.0.40.0070.05320.30
7.0.30.0070.04720.24
7.0.20.0200.04320.28
7.0.10.0070.05020.13
7.0.00.0170.04020.11
5.6.280.0100.06721.04
5.6.210.0070.08320.56
5.6.200.0100.05018.26
5.6.190.0130.04320.63
5.6.180.0230.04020.56
5.6.170.0200.04320.33
5.6.160.0170.03720.45
5.6.150.0170.03720.27
5.6.140.0200.06020.17
5.6.130.0130.09320.34
5.6.120.0300.05320.37
5.6.110.0270.06720.36
5.6.100.0200.05320.10
5.6.90.0200.06720.35
5.6.80.0170.07719.76
5.6.70.0270.07319.56
5.6.60.0230.08019.81
5.6.50.0270.07019.77
5.6.40.0370.04319.77
5.6.30.0200.08319.79
5.6.20.0230.05319.53
5.6.10.0130.04719.57
5.6.00.0300.07019.53
5.5.350.0030.04020.42
5.5.340.0000.04017.89
5.5.330.0100.04320.47
5.5.320.0200.03320.22
5.5.310.0200.03320.28
5.5.300.0170.05320.25
5.5.290.0270.07319.98
5.5.280.0230.07719.91
5.5.270.0300.05319.90
5.5.260.0370.05720.13
5.5.250.0200.06719.95
5.5.240.0170.07319.52
5.5.230.0230.06319.49
5.5.220.0270.04319.63
5.5.210.0330.07019.50
5.5.200.0270.05719.52
5.5.190.0300.06019.56
5.5.180.0230.06019.28
5.5.160.0300.04019.52
5.5.150.0230.04719.52
5.5.140.0400.05319.32
5.5.130.0230.07319.40
5.5.120.0200.08319.52
5.5.110.0230.07319.46
5.5.100.0100.05019.16
5.5.90.0230.05319.23
5.5.80.0230.08019.50
5.5.70.0230.07019.36
5.5.60.0200.03719.41
5.5.50.0270.05719.22
5.5.40.0200.07719.47
5.5.30.0230.06319.45
5.5.20.0230.07319.39
5.5.10.0300.06319.14
5.5.00.0130.05019.14
5.4.450.0500.06019.47
5.4.440.0170.04019.35
5.4.430.0270.04019.11
5.4.420.0200.08319.11
5.4.410.0230.07319.34
5.4.400.0200.04019.18
5.4.390.0230.07719.14
5.4.380.0430.06018.75
5.4.370.0230.06319.09
5.4.360.0230.05319.08
5.4.350.0230.07319.18
5.4.340.0200.08019.08
5.4.320.0200.05318.81
5.4.310.0230.08019.11
5.4.300.0230.06719.18
5.4.290.0300.04318.79
5.4.280.0270.05018.79
5.4.270.0230.05719.14
5.4.260.0100.06719.08
5.4.250.0200.04019.08
5.4.240.0230.07318.78
5.4.230.0270.05718.78
5.4.220.0270.03019.08
5.4.210.0230.03319.07
5.4.200.0230.05019.07
5.4.190.0200.05019.17
5.4.180.0400.04318.93
5.4.170.0230.06719.13
5.4.160.0170.03719.05
5.4.150.0130.05018.91
5.4.140.0170.05316.25
5.4.130.0300.06016.23
5.4.120.0370.04316.19
5.4.110.0300.05716.21
5.4.100.0200.08016.25
5.4.90.0270.06716.31
5.4.80.0230.05016.25
5.4.70.0270.06316.26
5.4.60.0270.05316.22
5.4.50.0230.06716.30
5.4.40.0300.04316.32
5.4.30.0170.06016.24
5.4.20.0170.07016.24
5.4.10.0270.07016.28
5.4.00.0230.05715.78
5.3.290.0300.03714.63
5.3.280.0170.04714.55
5.3.270.0230.07714.58
5.3.260.0130.04014.52
5.3.250.0330.06314.55
5.3.240.0230.05314.45
5.3.230.0130.05714.58
5.3.220.0330.04014.53
5.3.210.0230.06714.58
5.3.200.0270.05314.52
5.3.190.0230.03714.55
5.3.180.0300.06314.54
5.3.170.0270.03714.51
5.3.160.0230.06714.53
5.3.150.0170.06714.53
5.3.140.0300.06314.47
5.3.130.0270.06714.45
5.3.120.0200.07714.53
5.3.110.0270.06314.37
5.3.100.0200.07013.98
5.3.90.0130.04714.02
5.3.80.0170.04313.83
5.3.70.0170.08013.96
5.3.60.0170.05313.96
5.3.50.0300.06014.06
5.3.40.0300.06313.90
5.3.30.0230.06713.88
5.3.20.0230.07313.65
5.3.10.0170.06013.61
5.3.00.0300.06013.77
5.2.170.0230.05313.01
5.2.160.0230.05313.01
5.2.150.0200.06313.01
5.2.140.0130.06713.01
5.2.130.0170.05313.01
5.2.120.0170.06013.01
5.2.110.0230.05313.01
5.2.100.0170.03313.01
5.2.90.0200.06013.01
5.2.80.0230.05313.01
5.2.70.0130.04013.01
5.2.60.0130.05313.01
5.2.50.0200.06013.01
5.2.40.0130.06013.01
5.2.30.0170.05713.01
5.2.20.0270.06013.01
5.2.10.0130.03013.01
5.2.00.0170.05013.01
5.1.60.0070.04713.01
5.1.50.0100.05313.01
5.1.40.0170.04713.01
5.1.30.0100.05313.01
5.1.20.0170.03713.01
5.1.10.0170.04013.01
5.1.00.0030.03313.01
5.0.50.0070.04313.01
5.0.40.0070.04013.01
5.0.30.0100.04713.01
5.0.20.0070.04313.01
5.0.10.0100.03713.01
5.0.00.0070.06013.01
4.4.90.0070.03713.01
4.4.80.0130.03013.01
4.4.70.0070.03313.01
4.4.60.0070.02313.01
4.4.50.0100.03713.01
4.4.40.0100.05313.01
4.4.30.0130.01713.01
4.4.20.0070.02713.01
4.4.10.0030.01713.01
4.4.00.0070.04313.01
4.3.110.0130.02713.01
4.3.100.0100.03013.01
4.3.90.0100.03313.01
4.3.80.0070.05313.01
4.3.70.0070.03013.01
4.3.60.0130.03013.01
4.3.50.0130.02713.01
4.3.40.0070.04713.01
4.3.30.0030.04013.01
4.3.20.0030.02713.01
4.3.10.0030.02313.01
4.3.00.0070.02713.01

preferences:
67.69 ms | 401 KiB | 5 Q