fork download
  1. <?php
  2.  
  3. $pattern = "#([a-z]*)|(chol)#";
  4. preg_match($pattern, 'chol',$m);
  5.  
  6. print_r($m);
Success #stdin #stdout 0s 82944KB
stdin
Standard input is empty
stdout
Array
(
    [0] => chol
    [1] => chol
)