<?php $case = '2 s foo'; function test($case) { $reg1 = <<<'REGEX' / ^ (?<int> (?:\G|(?!\n)) \s*\b \d{1,5} \s* ) (?<timepart> (?: s | m | h | d ) \b ) (?<string>.+) $ /uix REGEX; $out = preg_replace_callback ($reg1, function($matches){ var_dump($matches); }, $case); } $output = test($case); var_dump($output);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`