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]);
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0 - 8.5.1
array(19) { [0]=> string(5) "Hello" [1]=> string(2) "!!" [2]=> string(2) " I" [3]=> string(2) "'m" [4]=> string(7) " Sajjad" [5]=> string(8) " Hossain" [6]=> string(6) " Sagor" [7]=> string(1) "." [8]=> string(3) " It" [9]=> string(2) "'s" [10]=> string(5) " 2023" [11]=> string(1) "." [12]=> string(2) " w" [13]=> string(2) "00" [14]=> string(1) "t" [15]=> string(2) " :" [16]=> string(1) "D" [17]=> string(1) " " [18]=> string(12) "\ud83e\udd17" }
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
146.47 ms | 408 KiB | 5 Q