fork download
  1. <?php
  2.  
  3. $headerETags = array();
  4.  
  5. $IfNoneMatchTestPattern = '#^((W/)?"[\x00-\x7f]*?", )*(W/)?"[\x00-\x7f]*?"$#';
  6. $IfNoneMatchEtagsPattern = '#(?:W/)?("[\x00-\x7f]*?")(?=$|, (?:W/)?"[\x00-\x7f]*?")#';
  7.  
  8. if (!preg_match($IfNoneMatchTestPattern, $headerValue)) {
  9.  
  10. write2log("Нестандартный Etag $headerValue.", ADD_CLIENT_HEADERS);
  11. $headerETags = array($headerValue);
  12.  
  13. } elseif (preg_match_all($IfNoneMatchEtagsPattern, $headerValue, $headerETags)) {
  14.  
  15. $headerETags = $headerETags[1]; // первая подмаска
  16.  
  17. } else {
  18.  
  19. write2log("If-None-Match прошел проверку, но не дал совпадений. Шта?", ADD_CLIENT_HEADERS);
  20. $headerETags = array($headerValue);
  21.  
  22. }
Runtime error #stdin #stdout #stderr 0.02s 52432KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined variable: headerValue in /home/ZQv8vZ/prog.php on line 8
PHP Fatal error:  Call to undefined function write2log() in /home/ZQv8vZ/prog.php on line 10