You can't run PHP inside of a packaged app, although it is possible to talk to a third party service for sync completely through JavaScript.
You would use a cross-domain ajax request and some sort of authorization to connect to the service. Many services support OAuth, and there's a library for Chrome extensions (should work for Packaged apps, let me know if it doesn't) documented here:
http://code.google.com/chrome/extensions/trunk/tut_oauth.html
Once you've authorized, you would use ajax calls to the service's API to store/fetch data for the current user.
~Arne