test
This commit is contained in:
commit
3ee3502362
20
index.php
Normal file
20
index.php
Normal 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>
|
Loading…
Reference in New Issue
Block a user