Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

Lines changed: 5 additions & 5 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /