fork download
  1. <?php
  2. $test = "9хме1";
  3. if(preg_match("/[0-9]х?ме[0-1]/", $test)) {
  4. echo "WIN1\n";
  5. }
  6. switch($test) {
  7. case preg_match("/[0-9]х?ме[0-1]/", $test):
  8. echo "WIN2\n";
  9. case preg_match("/[0-9]х?ме[0-1]/", $test)==true:
  10. echo "WIN3\n";
  11. }
  12.  
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
WIN1
WIN3