3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Keys taken from the phpecc unit tests, but that library's still vulnerable * to several side-channels, so don't use it. */ $private = '-----BEGIN EC PRIVATE KEY----- MHQCAQEEIOZ0ioEAxAkAH/7gnZZWIvReXfez9ahXMpOwHzdEkvKcoAcGBSuBBAAK oUQDQgAE8bjuAc1ucXAA/LbG9i2DSSD8pdgsze34XPD+ddINq3IR/F7TbNvHJdYL alPIMqm0GJuVB+UGg5duB+921yHYPQ== -----END EC PRIVATE KEY-----'; $public = '-----BEGIN PUBLIC KEY----- MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAE8bjuAc1ucXAA/LbG9i2DSSD8pdgsze34 XPD+ddINq3IR/F7TbNvHJdYLalPIMqm0GJuVB+UGg5duB+921yHYPQ== -----END PUBLIC KEY-----'; $privateKey = openssl_pkey_get_private($private); $publicKey = openssl_pkey_get_public($public); $data = /* file_get_contents("download.zip")*/ 'Foo bar'; $res = openssl_sign($data, $signature, $privateKey, OPENSSL_ALGO_SHA256); var_dump(base64_encode($signature)); $ok = openssl_verify($data, $signature, $publicKey, OPENSSL_ALGO_SHA256); var_dump($ok);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function openssl_pkey_get_private() in /in/E1C9Y:18 Stack trace: #0 {main} thrown in /in/E1C9Y on line 18
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:
28.69 ms | 405 KiB | 5 Q