3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Hello!! I'm Sajjad Hossain Sagor. It's 2023. w00t :D \ud83e\udd17"; $pattern = "/(?:\\\\u[a-f0-9]+)+|'[stdm]|'[rv]e|'ll| ?\p{L}+| ?\p{N}+| ?(?!\\\\u[a-f0-9]+\b)[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+/"; preg_match_all( $pattern, $text, $matches ); var_dump($matches[0]);

preferences:
24.63 ms | 405 KiB | 5 Q