2020-05-06 19:56:06 +02:00
|
|
|
<html>
|
|
|
|
<body>
|
2020-05-06 20:09:12 +02:00
|
|
|
<?php if (! isset($_POST['text'])) {
|
2020-05-06 19:56:06 +02:00
|
|
|
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>
|