3v4l.org

run code in 300+ PHP versions simultaneously
<?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 git.master, git.master_jit, rfc.property-hooks
Warning: require_once(): open_basedir restriction in effect. File(Crypt/GPG.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/S0CDb on line 6 Warning: require_once(Crypt/GPG.php): Failed to open stream: Operation not permitted in /in/S0CDb on line 6 Fatal error: Uncaught Error: Failed opening required 'Crypt/GPG.php' (include_path='.:') in /in/S0CDb:6 Stack trace: #0 {main} thrown in /in/S0CDb on line 6
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
49.12 ms | 401 KiB | 8 Q