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