Apparently on PHP 4.2, this function returns an array instead of an object.
That being the case, the example code above would translate to:
<?php
$info = apache_lookup_uri('index.php?var=value');
print_r($info);
if (file_exists($info['filename'])) {
echo 'file exists!';
}
?>
A means of making this transparent so that the object syntax works, is left as an exercise for the reader. ;-)