Optional Array, provide an key "extracerts" with as value an array of extra certificates or a single certificate to be included in the PKCS#12 file.
Provide an key "friendlyname" with as value an string to be used for the supplied certificate and key.

If you want to include CA-Certificates in the PKCS12 it can be accomplished by using the $args parameter.<?php$args = array('extracerts' => $CAcert,'friendly_name' => 'My signed cert by CA certificate');openssl_pkcs12_export($signed_csr, $cerificate_out, $private_key_resource, $passphrase, $args);?>