3v4l.org

run code in 300+ PHP versions simultaneously
<?php public $pubkey = '...public key here...'; public $privkey = '...private key here...'; function encrypt($data) { if (openssl_public_encrypt($data, $encrypted, $this->pubkey)) $data = base64_encode($encrypted); else throw new Exception('Unable to encrypt data. Perhaps it is bigger than the key size?'); return $data; } function decrypt($data) { if (openssl_private_decrypt(base64_decode($data), $decrypted, $this->privkey)) $data = $decrypted; else $data = ''; return $data; } $e = encrypt('hello'); var_dump($e); var_dump(decrypt($e));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.6.150.0100.08018.19
5.6.140.0100.05318.24
5.6.130.0070.04018.15
5.6.120.0030.04021.12
5.6.110.0070.07320.88
5.6.100.0030.05320.88
5.6.90.0100.08320.96
5.6.80.0070.04020.47
5.5.300.0170.07317.92
5.5.290.0130.06017.96
5.5.280.0100.08320.79
5.5.270.0170.07720.76
5.5.260.0170.07320.81
5.5.250.0100.07720.68
5.5.240.0200.02720.25

preferences:
140.83 ms | 1398 KiB | 7 Q