fork(1) download
  1. <?php
  2.  
  3. $text = 'Ты че жы делаешь то. Я зделал но неправильно';
  4. $regexp = '/(жы)|(шы)|([,]|[.]|[!]|[?]|[;]|[:])[^\s]|координально|сдесь|здел(ал|аю|ан)|[^,][\s](а|но)/u';
  5. $matches = array();
  6.  
  7. if(preg_match_all($regexp, $text, $matches, $out, $PREG_PATTERN_ORDER)){
  8. echo "Ты охуел, братан? \n";
  9. echo $out[0][0] . ", " . $out[0][1] . "\n";
  10. echo $out[1][0] . ", " . $out[1][1] . "\n";
  11. } else {
  12. echo "Vse ok";
  13. }
Success #stdin #stdout #stderr 0.02s 52472KB
stdin
Standard input is empty
stdout
Ты охуел, братан? 
, 
, 
stderr
PHP Notice:  Undefined variable: out in /home/xULFnO/prog.php on line 8
PHP Notice:  Undefined variable: PREG_PATTERN_ORDER in /home/xULFnO/prog.php on line 8
PHP Notice:  Undefined variable: out in /home/xULFnO/prog.php on line 10
PHP Notice:  Undefined variable: out in /home/xULFnO/prog.php on line 10
PHP Notice:  Undefined variable: out in /home/xULFnO/prog.php on line 11
PHP Notice:  Undefined variable: out in /home/xULFnO/prog.php on line 11