3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!preg_match('#((\d+)\s+year(s)?(,\s+)?)?((\d+)\s+week(s)?(,\s+)?)?((\d+)\s+day(s)?(,\s+)?)?((\d+)\s+hour(s)?(,\s+)?)?((\d+)\s+minute(s)?(,\s+)?)?((\d+)\s+second(s)?)?#', '21 minutes, 34 seconds', $match)) { var_dump($match); }

preferences:
40.96 ms | 402 KiB | 5 Q