3v4l.org

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