3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php use \Firebase\JWT\JWT; //function to generate JWT function generateJWT () { $key = 'key'; $secret = 'secret'; $token = array( "iss" => $key, // The benefit of JWT is expiry tokens, we'll set this one to expire in 1 minute "exp" => time() + 60 ); return JWT::encode($token, $secret); } echo generateJWT();
Output for 7.0.0 - 7.3.1
Fatal error: Uncaught Error: Class 'Firebase\JWT\JWT' not found in /in/g2f77:14 Stack trace: #0 /in/g2f77(17): generateJWT() #1 {main} thrown in /in/g2f77 on line 14
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Class undefined: Firebase\JWT\JWT in /in/g2f77:-1 Stack trace: #0 /in/g2f77(-1): generateJWT() #1 {main}
Process exited with code 255.
Output for hhvm-3.11.1 - 3.21.3
Fatal error: Uncaught Error: Class undefined: Firebase\JWT\JWT in /in/g2f77:14 Stack trace: #0 /in/g2f77(17): generateJWT() #1 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Fatal error: Class undefined: Firebase\JWT\JWT in /in/g2f77 on line 14
Process exited with code 255.
Output for 5.3.0 - 5.6.30
Fatal error: Class 'Firebase\JWT\JWT' not found in /in/g2f77 on line 14
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/g2f77 on line 3 Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /in/g2f77 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/g2f77 on line 3 Parse error: parse error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /in/g2f77 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/g2f77 on line 3 Parse error: parse error, expecting `T_CONSTANT_ENCAPSED_STRING' or `'('' in /in/g2f77 on line 3
Process exited with code 255.