I converted a regular expression taken from https://twemoji.maxcdn.com/v/latest/twemoji.js that matches the Unicode characters related to emojis from javascript to php.
The converted regex works as intended when I'm testing it with regex101.com
However when I test in my local environment its not working.
You can see a working example here https://regex101.com/r/IuIhBF/1
Here is the PHP version. http://sandbox.onlinephpfunctions.com/code/3bd5933f5230fc1c45104b7eccd9379b68870016
I tried changing the preg_match_all flags. Adding u to the regular expression ex: /*****/u
Can't get it to work
Would be great if somebody could help me solve that error: Compilation failed: range out of order in character class at offset 306.