3v4l.org

run code in 300+ PHP versions simultaneously
<?php $privateKey = openssl_pkey_new([ 'private_key_bits' => 2048, //'private_key_type' => OPENSSL_KEYTYPE_RSA, // RSA is default //'encrypt_key' => true // we don't want encryption ]); print_r($privateKey);

preferences:
34.8 ms | 402 KiB | 5 Q