fork download
  1. <?php
  2.  
  3. $str1 = "دیوار";
  4. $str2 = "دیوارر";
  5.  
  6. echo preg_match('/\b(?:دیوار|خوب)\b/u', $str1) ? 1 : 2; // output: 1
  7. echo preg_match('/\b(?:دیوار|خوب)\b/u', $str2) ? 1 : 2; // output: 1 (it should be 2)
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
12