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 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
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.
Output for 8.0.13
Warning: require_once(Crypt/GPG.php): Failed to open stream: No such file or directory 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.
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.3.32 - 7.3.33, 7.4.33
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 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
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: require_once(): Failed opening required 'Crypt/GPG.php' (include_path='.:') in /in/S0CDb on line 6
Process exited with code 255.
Output for 7.1.20
Warning: require_once(): open_basedir restriction in effect. File(Crypt/GPG.php) is not within the allowed path(s): (/tmp:/in) 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: 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.3.11, 4.4.0 - 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.

preferences:
244.4 ms | 401 KiB | 369 Q