3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(\d)\#/is'; $str = '1#P,8488936,12,1'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result var_dump($matches);

preferences:
84.43 ms | 402 KiB | 5 Q