This is a PHP Code sample that I have posted. I have documented this in a blog post entitled "Building a CMIS REST Client Application using PHP".