You might be able to setup a sort of test harness that allows you to inject inputs and retrieve outputs as if it were a normal user-->web server (HTTP request) and web server-->user (HTTP response) transaction via the use of [man]include[/man]. For example, you could have a script that you would directly execute that does something like:
// enable output buffering since we want to capture/analyze output
// note that if the script under test actually uses output buffering, you might run into issues
ob_start();
// simulate normal Apache headers
$_SERVER['DOCUMENT_ROOT'] = '/var/www/';
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19';
$_SERVER['REMOTE_ADDR'] = '123.45.67.89';
// simulate query string parameters
$_GET['action'] = 'signup';
// simulate POST'ed data
$_SERVER['REQUEST_METHOD'] = 'POST';
$_POST['username'] = 'foobar';
$_POST['password'] = 'barfoo';
$_POST['submit'] = 'submit';
// invoke script to be tested
include 'index.php';
// retrieve generated output
$output = ob_get_clean();
EDIT: Note that if you can leverage your existing webserver and simply perform the tests against it, I would agree with Derkorian - why not simply use [man]cURL[/man] to send an HTTP request to your webserver just like a regular client would?