[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Firestore Client - Class FieldPath (1.53.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.53.0 (latest)](/php/docs/reference/cloud-firestore/latest/FieldPath)\n- [1.52.0](/php/docs/reference/cloud-firestore/1.52.0/FieldPath)\n- [1.51.0](/php/docs/reference/cloud-firestore/1.51.0/FieldPath)\n- [1.50.0](/php/docs/reference/cloud-firestore/1.50.0/FieldPath)\n- [1.48.1](/php/docs/reference/cloud-firestore/1.48.1/FieldPath)\n- [1.47.3](/php/docs/reference/cloud-firestore/1.47.3/FieldPath)\n- [1.46.0](/php/docs/reference/cloud-firestore/1.46.0/FieldPath)\n- [1.45.2](/php/docs/reference/cloud-firestore/1.45.2/FieldPath)\n- [1.44.1](/php/docs/reference/cloud-firestore/1.44.1/FieldPath)\n- [1.43.3](/php/docs/reference/cloud-firestore/1.43.3/FieldPath)\n- [1.40.0](/php/docs/reference/cloud-firestore/1.40.0/FieldPath)\n- [1.39.0](/php/docs/reference/cloud-firestore/1.39.0/FieldPath)\n- [1.38.0](/php/docs/reference/cloud-firestore/1.38.0/FieldPath)\n- [1.37.7](/php/docs/reference/cloud-firestore/1.37.7/FieldPath)\n- [1.36.1](/php/docs/reference/cloud-firestore/1.36.1/FieldPath)\n- [1.35.0](/php/docs/reference/cloud-firestore/1.35.0/FieldPath)\n- [1.34.0](/php/docs/reference/cloud-firestore/1.34.0/FieldPath)\n- [1.33.0](/php/docs/reference/cloud-firestore/1.33.0/FieldPath)\n- [1.32.0](/php/docs/reference/cloud-firestore/1.32.0/FieldPath)\n- [1.31.0](/php/docs/reference/cloud-firestore/1.31.0/FieldPath)\n- [1.30.0](/php/docs/reference/cloud-firestore/1.30.0/FieldPath)\n- [1.28.0](/php/docs/reference/cloud-firestore/1.28.0/FieldPath)\n- [1.27.3](/php/docs/reference/cloud-firestore/1.27.3/FieldPath) \nReference documentation and code samples for the Cloud Firestore Client class FieldPath.\n\nRepresents a path to a Firestore Document field.\n\nExample: \n\n use Google\\Cloud\\Firestore\\FirestoreClient;\n\n $firestore = new FirestoreClient();\n $path = $firestore-\u003efieldPath(['accounts', 'usd']);\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Firestore\n\nMethods\n-------\n\n### __construct\n\n### child\n\nGet a new FieldPath with the given path part appended to the current\npath.\n\nExample: \n\n $child = $path-\u003echild('element');\n\n### pathString\n\nGet the current path as a string, with special characters escaped.\n\nExample: \n\n $string = $path-\u003epathString();\n\n### path\n\nGet the path elements.\n\n### __toString\n\nCast the path to a string.\n\n### static::documentId\n\nCreate a field path indicating the document ID.\n\nExample: \n\n use Google\\Cloud\\Firestore\\FieldPath;\n\n $path = FieldPath::documentId();\n\n### static::fromString\n\nCreate a FieldPath from a string path.\n\nExample: \n\n use Google\\Cloud\\Firestore\\FieldPath;\n\n $path = FieldPath::fromString('path.to.field');\n\nConstants\n---------\n\n### SPECIAL_CHARS\n\n Value: '/^[^*~\\/[\\]]+$/'\n\n### UNESCAPED_FIELD_NAME\n\n Value: '/^[_a-zA-Z][_a-zA-Z0-9]*$/'"]]