3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $msg_prefixes_to_delete = array('Eilmeldung', '+EIL+', 'Eilmeldung:'); $message = 'Eilmeldung Es geht los'; foreach ($msg_prefixes_to_delete as $delete) { if (strncmp($message, $delete, strlen($delete))) { $message = trim(substr($message, strlen($delete))); } } var_dump($message);
Output for 4.3.0 - 7.1.0
string(6) "ht los"