3v4l.org

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