Tip: Click lines to highlight, hold ctrl/cmd to multi-select

http://codedumper.com/ojivu (11-Apr @ 17:39)

Used to demonstrate a delay in loading a script tag. Would be called using:

<script src="?delay" type="text/javascript"></script>

Syntax Highlighted Code

  1. if (@$_GET['action'] == 'delay') {
  2.     sleep(1); // force a slow response
  3.     echo 'true;'; // don't cause JS errors
  4.     exit;
  5. }
  6.  

Plain Code

if (@$_GET['action'] == 'delay') {
    sleep(1); // force a slow response
    echo 'true;'; // don't cause JS errors
    exit;
}

Permalink: http://codedumper.com/ojivu