use `except as` to support python3
only offer completions in php files
Merge pull request #2 from DisposaBoy/master

use except as to support python3