Skip to content

Commit 2e542a5

Browse files
authored
Move plain text top of JSON
1 parent 8d0fb6c commit 2e542a5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

encode.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
use \Firebase\JWT\SignatureInvalidException;
66
$key = '83aeee518617ad6f3393bf0685e37d3e';
77

8+
// plain text
9+
$data = "Hello, World!";
10+
$jwt = JWT::encode($data, $key, 'HS256');
11+
print $jwt."\n";
12+
813
// JSON
914
$data=[
1015
"status"=>"success",
@@ -17,8 +22,3 @@
1722
$data = json_encode($data);
1823
$jwt = JWT::encode($data, $key, 'HS256');
1924
print $jwt."\n";
20-
21-
// plain text
22-
$data = "Hello, World!";
23-
$jwt = JWT::encode($data, $key, 'HS256');
24-
print $jwt."\n";

0 commit comments

Comments
 (0)