summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Raynor <chris@firebase.com>2014-08-25 08:28:46 -0700
committerChris Raynor <chris@firebase.com>2014-08-25 08:28:46 -0700
commitef310516c4f632d0c8289ccdf4150bc44dad4267 (patch)
treeaba2412661878fc9f16c82b2021a0f9e40861195
parentfa7e362eeeec5ee808124626c3f1a612aadbce52 (diff)
downloadphp-jwt-ef310516c4f632d0c8289ccdf4150bc44dad4267.zip
php-jwt-ef310516c4f632d0c8289ccdf4150bc44dad4267.tar.gz
php-jwt-ef310516c4f632d0c8289ccdf4150bc44dad4267.tar.bz2
adding documentation around casting the result to an associative array
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index 095e456..353a177 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,14 @@ $jwt = JWT::encode($token, $key);
$decoded = JWT::decode($jwt, $key);
print_r($decoded);
+
+/*
+ NOTE: This will now be an object instead of an associative array. To get
+ an associative array, you will need to cast it as such:
+*/
+
+$decoded_array = (array) $decoded;
+
?>
```