This commit is contained in:
vagrant 2020-05-06 17:56:06 +00:00
commit 3ee3502362

20
index.php Normal file
View File

@ -0,0 +1,20 @@
<html>
<body>
<?php if (isset($_POST['text'])) {
echo '
<form action="/" method="post">
Tekst: <textarea name="text"></textarea>
<input type="submit">
</form>';
} else {
$text = $_POST['text'];
echo '<h4>Liczba wielkich liter</h4>';
echo strlen(preg_replace('![^a-z]+!', '', $text));
echo '<h4>Liczba małych liter</h4>';
echo strlen(preg_replace('![^A-Z]+!', '', $text));
;
}
?>
</body>
</html>