3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function match($haystack, $needle) { return strpos($haystack, $needle) !== FALSE; } function remove($haystack, $needle) { return preg_replace("/{$needle}/", "", $needle) !== FALSE; } assert(remove("test string", "test") == " string"); assert(remove("string test test string", " test ") == "stringtest string");
based on fYig3
Output for 4.3.0 - 7.1.0