PHP updates

You can now add references. Ready for AMT