On a Unix/Linux/etc. system, mailboxes can be piped to an executable rather than storing the incoming mail to disk. Thus, you can setup a mailbox that executes a PHP script every time the mail daemon receives an e-mail addressed to that mailbox.
Alternatively, you could setup a cronjob (or write your own daemon using a PHP script that never terminates, I suppose...) that monitors a normal mailbox for incoming messages and processes them accordingly.