Manual:PageExists.php

Report whether a page with a specific title exists. It will print out the result to standard output with a meaningful text, and will set the exit status of the script to 0 if the page exists.

Invocation
php maintenance/pageExists.php "page title"

In requires one argument: Page title to check whether it exists