Fixes for php related weirdness encountered while reading code
Couple bugs, rest just ickyness
Merge pull request #1475 from JeffPyeBrook/pr-fix-expressions-that-are-odd

Fixes for php related weirdness encountered while reading code