Escape special characters php objects