fork download
  1. <?php
  2.  
  3. $a = "ue34, 4y3, 4yt4we,";
  4. $b = "43wt5, 235, 2v, 4y3,";
  5. preg_match_all("/[A-Za-z_0-9]{1,10}/i", $a, $matches);
  6. preg_match_all("/[A-Za-z_0-9]{1,10}/i", $b, $matches2);
  7. $c = array();
  8. $d = array();
  9. foreach ($matches as $v)
  10. {
  11. foreach ($v as $value)
  12. {
  13.  
  14. $c[] = $value;
  15.  
  16. }
  17. }
  18. foreach ($matches2 as $v)
  19. {
  20. foreach ($v as $value)
  21. {
  22.  
  23. $d[] = $value;
  24.  
  25. }
  26. }
  27.  
  28. foreach ($c as $key => $value) {
  29. if (in_array($value, $d)) {
  30. echo $value;
  31. }
  32. }
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
4y3