fork download
  1. <?php
  2. preg_replace("/[^\p{L}0-9\+\-\_:\.@ ]/u", "", $_string);
  3. $html = file_get_contents('yandex.ru');
  4. $url = 'yandex.ru';
  5. $vnut = array();
  6. $vnech = array();
  7. preg_match_all('~<a [^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>(((?!~si', $html, $matches);
  8. foreach ($matches[1] as $val) {
  9. if (!preg_match("~^[^=]+://~", $val) || preg_match("~^[^://]+://(www\.)?" . $url . "~i", $val)) {
  10. $vnut[] = $val;
  11. } else
  12. $vnech[] = $val;
  13. }
  14. $vnut = array_unique($vnut);
  15. $vnech = array_unique($vnech);
  16. print_r($vnut);
  17. print_r($vnech);
  18. ?>
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
<?php
^
Main.java:2: error: illegal escape character
preg_replace("/[^\p{L}0-9\+\-\_:\.@ ]/u", "", $_string);
                  ^
Main.java:2: error: illegal escape character
preg_replace("/[^\p{L}0-9\+\-\_:\.@ ]/u", "", $_string);
                          ^
Main.java:2: error: illegal escape character
preg_replace("/[^\p{L}0-9\+\-\_:\.@ ]/u", "", $_string);
                            ^
Main.java:2: error: illegal escape character
preg_replace("/[^\p{L}0-9\+\-\_:\.@ ]/u", "", $_string);
                              ^
Main.java:2: error: illegal escape character
preg_replace("/[^\p{L}0-9\+\-\_:\.@ ]/u", "", $_string);
                                 ^
Main.java:3: error: class, interface, or enum expected
$html  = file_get_contents('yandex.ru');
^
Main.java:3: error: unclosed character literal
$html  = file_get_contents('yandex.ru');
                           ^
Main.java:3: error: unclosed character literal
$html  = file_get_contents('yandex.ru');
                                     ^
Main.java:4: error: class, interface, or enum expected
$url   = 'yandex.ru';
^
Main.java:4: error: unclosed character literal
$url   = 'yandex.ru';
         ^
Main.java:4: error: unclosed character literal
$url   = 'yandex.ru';
                   ^
Main.java:6: error: class, interface, or enum expected
$vnech = array();
^
Main.java:7: error: class, interface, or enum expected
preg_match_all('~<a [^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>(((?!~si', $html, $matches);
^
Main.java:7: error: unclosed character literal
preg_match_all('~<a [^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>(((?!~si', $html, $matches);
               ^
Main.java:7: error: illegal character: \92
preg_match_all('~<a [^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>(((?!~si', $html, $matches);
                                ^
Main.java:7: error: unclosed character literal
preg_match_all('~<a [^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>(((?!~si', $html, $matches);
                                 ^
Main.java:7: error: illegal character: \92
preg_match_all('~<a [^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>(((?!~si', $html, $matches);
                                       ^
Main.java:7: error: unclosed character literal
preg_match_all('~<a [^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>(((?!~si', $html, $matches);
                                        ^
Main.java:7: error: illegal character: \92
preg_match_all('~<a [^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>(((?!~si', $html, $matches);
                                              ^
Main.java:7: error: unclosed character literal
preg_match_all('~<a [^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>(((?!~si', $html, $matches);
                                               ^
Main.java:7: error: unclosed character literal
preg_match_all('~<a [^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>(((?!~si', $html, $matches);
                                                                 ^
Main.java:8: error: class, interface, or enum expected
foreach ($matches[1] as $val) {
^
Main.java:9: error: illegal escape character
    if (!preg_match("~^[^=]+://~", $val) || preg_match("~^[^://]+://(www\.)?" . $url . "~i", $val)) {
                                                                         ^
Main.java:11: error: class, interface, or enum expected
    } else
    ^
Main.java:13: error: class, interface, or enum expected
}
^
Main.java:15: error: class, interface, or enum expected
$vnech = array_unique($vnech);
^
Main.java:16: error: class, interface, or enum expected
print_r($vnut);
^
Main.java:17: error: class, interface, or enum expected
print_r($vnech);
^
Main.java:18: error: class, interface, or enum expected
?>
^
30 errors
stdout
Standard output is empty