3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = "1234 4569 "; $allowedInputSeparators = array('\r\n', '\n', '\t', ',', ';', '|', '\s'); $pattern = '/(.+?)' . implode('|', $allowedInputSeparators) . '/'; preg_match_all($pattern, $value, $matches); print_r($matches);

preferences:
45.31 ms | 402 KiB | 5 Q