<?php
$foo='تذوق لحظات الطعام والشراب اللذيذة';
var_dump(preg_match('/\R/', $foo));
var_dump(str_contains($foo, "\r"));
?>
the output of the above is that the preg_match
returns 1
indicating a match but the str_contains
returns false
(as I'd expect since I see no carriage return?).
Is this some issue relating to performing regex searches on non-ASCII strings?
You can demo this here