Skip to content

Commit

Permalink
satz.php: Anpassung für alte PHP-Versionen
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Bläul committed Oct 10, 2016
1 parent 0c4e696 commit f4faae3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ elm-stuff/
# elm-repl generated files
repl-temp-*
/index.html
/*.bak
7 changes: 5 additions & 2 deletions satz.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?php
$sText = join(' ', array_map(function($input) {

function silbentrennung_am_zeilenende_entfernen($input) {
return preg_replace("/([a-z])- +/", "$1", $input);
}, file('Michael Ende - Der Wunschpunsch.txt')));
}
$sText = join(' ', array_map('silbentrennung_am_zeilenende_entfernen',
file('Michael Ende - Der Wunschpunsch.txt')));
$sText = str_replace(array("\n", "\r"), "", $sText);

Expand Down

0 comments on commit f4faae3

Please sign in to comment.