PHP 8.5.0 Alpha 1 available for testing

Voting

: nine minus six?
(Example: nine)

The Note You're Voting On

obsidian[at-nospam]codebite[dot]net
14 years ago
As a note, the docs don't show the (optional) second parameter nor mention the existence of the Phar::OPENSSL class constant also available for use with this method.

To sign a phar with OpenSSL, for example...

<?php

$phar
= new Phar('somephar.phar');
// ... add your files and such
$phar->setSignatureAlgorithm(Phar::OPENSSL, file_get_contents('private_key_here.pem'));
// ... do whatever else you want afterwards here ...
?>

Hope this proves useful to someone.

<< Back to user notes page

To Top