Skip to content

Commit fdf4b18

Browse files
author
Chris Raynor
committed
Merge pull request #14 from firebase/object-docs
Adding documentation around casting the result to an associative array
2 parents fa7e362 + ef31051 commit fdf4b18

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ $jwt = JWT::encode($token, $key);
3131
$decoded = JWT::decode($jwt, $key);
3232

3333
print_r($decoded);
34+
35+
/*
36+
NOTE: This will now be an object instead of an associative array. To get
37+
an associative array, you will need to cast it as such:
38+
*/
39+
40+
$decoded_array = (array) $decoded;
41+
3442
?>
3543
```
3644

0 commit comments

Comments
 (0)