HF RL Explorer

Task: Explode String by One or More Spaces or Tabs in PHP

Task: Explode String by One or More Spaces or Tabs in PHP: a task in Terminal-Lego-15k (Harbor dataset). Write a PHP script that splits (explodes) a string by one or more consecutive spaces or tabs into an array of non-empty elements. PHP's built-in explode() function does not support regular…

The task

Write a PHP script that splits (explodes) a string by one or more consecutive spaces or tabs into an array of non-empty elements. PHP's built-in `explode()` function does not support regular expressions, so you need to find an appropriate approach that handles **one or more** whitespace characters (spaces and/or…

Part of PrimeIntellect/Terminal-Lego-15k.