Output of the "Trimming the first word of a string with PHP" PHP snippet

Environment:

  • Strangebuzz Snippet VM: 6.4.2
  • PHP: 8.3
  • Symfony: 6.4.3

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