3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); ini_set('display_errors', 1); require_once 'Crypt/GPG.php'; $gpg = new Crypt_GPG(); try { $gpg->addEncryptKey('E4908A0CED1C250E68A3185C72B7C89DD5673539'); $data = $gpg->encrypt('my secret data'); } catch (Exception $ex) { echo $ex->getMessage(); } //var_dump($data); $txt = '-----BEGIN PGP MESSAGE----- Version: BCPG v1.50 hIwDcrfIndVnNTkBA/4/e4X9ZqQ9Y1VVuRsO8eCkGek2biWjajHb+kDKamNqE1IO py2y0821bkMR/CGz0r+UvWgOavvzYBIKTO7CIMEPgDKbtYvoXzub5F42M1f5Mf9Z Kanb9DgaOEWIUQz0cGOGEPXVTCedoUbSCrDKa0OBEXZY/vDL/YwMpi7KHjoDF9I+ AbeJlQoiAKFPVw13qYf5jDaOiL9KBNuuWmbA4EDQUQpPuTXPqIiywX09pBR/h8o0 zxkEHqIlQPQtI1POjy8==4Ae5 -----END PGP MESSAGE-----'; try { $gpg->addDecryptKey('E4908A0CED1C250E68A3185C72B7C89DD5673539','LOGINSTOREWALLPROD'); $data = $gpg->decrypt($data); } catch (Exception $ex) { echo $ex->getMessage(); } var_dump($data); ?>
Output for 5.1.0 - 7.1.0
Warning: require_once(Crypt/GPG.php): failed to open stream: No such file or directory in /in/S0CDb on line 6 Fatal error: require_once(): Failed opening required 'Crypt/GPG.php' (include_path='.:') in /in/S0CDb on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: main(Crypt/GPG.php): failed to open stream: No such file or directory in /in/S0CDb on line 6 Fatal error: main(): Failed opening required 'Crypt/GPG.php' (include_path='.:') in /in/S0CDb on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/S0CDb on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '{' in /in/S0CDb on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/S0CDb on line 8
Process exited with code 255.