Environment:
- Strangebuzz Snippet VM: 6.4.9
- PHP: 8.4
- Symfony: 6.4.20
Code execution output:
string: removeMe|meow|DoNotremoveMe|cat
needle: removeMe
—— With pure PHP —————————————————————————————————————————————————
|meow|DoNotremoveMe|cat
—— With the Symfony string component —————————————————————————————
|meow|DoNotremoveMe|cat
—— Or, as of Symfony 5.4 —————————————————————————————————————————
|meow|DoNotremoveMe|cat
—— With my Symfony string component helper ———————————————————————
|meow|DoNotremoveMe|cat