preplace php code example Example: php preplace str_replace("foo", "bar", "foo test"); // returns "bar test"